projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
CRED: Fix double free in prepare_usermodehelper_creds() error handling
[linux-2.6-microblaze.git]
/
kernel
/
cred.c
diff --git
a/kernel/cred.c
b/kernel/cred.c
index
1b1129d
..
ce1a52b
100644
(file)
--- a/
kernel/cred.c
+++ b/
kernel/cred.c
@@
-10,6
+10,7
@@
*/
#include <linux/module.h>
#include <linux/cred.h>
+#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/key.h>
#include <linux/keyctl.h>
@@
-397,6
+398,8
@@
struct cred *prepare_usermodehelper_creds(void)
error:
put_cred(new);
+ return NULL;
+
free_tgcred:
#ifdef CONFIG_KEYS
kfree(tgcred);