mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
kmod: Release sub_info on cred allocation failure.
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>
This commit is contained in:
parent
d4a76f8a61
commit
ab2b7ebaad
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue