patch-2.4.26 linux-2.4.26/fs/binfmt_elf.c

Next file: linux-2.4.26/fs/devfs/base.c
Previous file: linux-2.4.26/drivers/video/sis/vstruct.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.25/fs/binfmt_elf.c linux-2.4.26/fs/binfmt_elf.c
@@ -479,7 +479,8 @@
 		goto out_free_ph;
 		
 	files = current->files;		/* Refcounted so ok */
-	if(unshare_files() < 0)
+	retval = unshare_files();
+	if (retval < 0)
 		goto out_free_ph;
 	if (files == current->files) {
 		put_files_struct(files);
@@ -820,7 +821,8 @@
 	/* error cleanup */
 out_free_dentry:
 	allow_write_access(interpreter);
-	fput(interpreter);
+	if (interpreter)
+		fput(interpreter);
 out_free_interp:
 	if (elf_interpreter)
 		kfree(elf_interpreter);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)