[PATCH] fix another load_elf_binary error path

From: Chris Wright
Date: Thu Apr 08 2004 - 18:59:35 EST


Protect against cases where interpreter is NULL. Patch against 2.4.26-rc2.

Error noted by Kirill Korotaev <kirillx@xxxxxxxxxxx>.

--- a/fs/binfmt_elf.c~unshare 2004-04-08 15:13:55.654720832 -0700
+++ b/fs/binfmt_elf.c 2004-04-08 15:23:52.788942632 -0700
@@ -821,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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/