From 4b4fb8c2e5a1f6f85c3e19c7183bc6e79852f5f7 Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Wed, 30 Sep 2009 17:22:10 +0100 Subject: [PATCH] modprobe: fix potential memory leak on failure path Ensure release_elf_file() is called on a rare failure path. Signed-off-by: Alan Jenkins --- modprobe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modprobe.c b/modprobe.c index 1891dad..9f92ae2 100644 --- a/modprobe.c +++ b/modprobe.c @@ -1279,7 +1279,7 @@ static int insmod(struct list_head *list, if (flags & mit_first_time) error("Module %s already in kernel.\n", newname ?: mod->modname); - goto out_unlock; + goto out_elf_file; } /* don't warn noisely if we're loading multiple aliases. */ /* one of the aliases may try to use hardware we don't have. */ -- 2.11.4.GIT