Skip to contentSkip to conversation

fix another load_elf_binary error path

PATCH New Chris Wright 1 participant 1 message Apr 8, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix another load_elf_binary error path

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

Error noted by Kirill Korotaev <[email protected]>.

fs/binfmt_elf.c renamed from fs/binfmt_elf.c~unshare +2 -1
@@ -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);