Commit 246750ff authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of...

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  CRED: Fix memory leak in error handling
parents 4660d3d2 570b8fb5
......@@ -364,7 +364,7 @@ struct cred *prepare_usermodehelper_creds(void)
new = kmem_cache_alloc(cred_jar, GFP_ATOMIC);
if (!new)
return NULL;
goto free_tgcred;
kdebug("prepare_usermodehelper_creds() alloc %p", new);
......@@ -397,6 +397,10 @@ struct cred *prepare_usermodehelper_creds(void)
error:
put_cred(new);
free_tgcred:
#ifdef CONFIG_KEYS
kfree(tgcred);
#endif
return NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment