projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4a76f8
)
kmod: Release sub_info on cred allocation failure.
author
Tetsuo Handa
<penguin-kernel@i-love.sakura.ne.jp>
Tue, 26 May 2009 08:11:03 +0000
(09:11 +0100)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Tue, 26 May 2009 19:11:19 +0000
(12:11 -0700)
call_usermodehelper_setup() forgot to kfree(sub_info)
when prepare_usermodehelper_creds() failed.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/kmod.c
patch
|
blob
|
history
diff --git
a/kernel/kmod.c
b/kernel/kmod.c
index b750675251e5160ea005e9c384e4c07619731f7d..7e95bedb2bfc19bc1d10eaed1337cd02c1ffdb1c 100644
(file)
--- a/
kernel/kmod.c
+++ b/
kernel/kmod.c
@@
-370,8
+370,10
@@
struct subprocess_info *call_usermodehelper_setup(char *path, char **argv,
sub_info->argv = argv;
sub_info->envp = envp;
sub_info->cred = prepare_usermodehelper_creds();
- if (!sub_info->cred)
+ if (!sub_info->cred) {
+ kfree(sub_info);
return NULL;
+ }
out:
return sub_info;