aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cred.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2010-05-17 19:30:58 -0400
committerDan Williams <dan.j.williams@intel.com>2010-05-17 19:30:58 -0400
commit0b28330e39bbe0ffee4c56b09fc415fcec595ea3 (patch)
treefcf504879883763557e696eff81427b1ab78f76b /kernel/cred.c
parent058276303dbc4ed089c1f7dad0871810b1f5ddf1 (diff)
parentcaa20d974c86af496b419eef70010e63b7fab7ac (diff)
Merge branch 'ioat' into dmaengine
Diffstat (limited to 'kernel/cred.c')
-rw-r--r--kernel/cred.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/cred.c b/kernel/cred.c
index 1ed8ca18790c..e1dbe9eef800 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -10,6 +10,7 @@
10 */ 10 */
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/cred.h> 12#include <linux/cred.h>
13#include <linux/slab.h>
13#include <linux/sched.h> 14#include <linux/sched.h>
14#include <linux/key.h> 15#include <linux/key.h>
15#include <linux/keyctl.h> 16#include <linux/keyctl.h>
@@ -364,7 +365,7 @@ struct cred *prepare_usermodehelper_creds(void)
364 365
365 new = kmem_cache_alloc(cred_jar, GFP_ATOMIC); 366 new = kmem_cache_alloc(cred_jar, GFP_ATOMIC);
366 if (!new) 367 if (!new)
367 return NULL; 368 goto free_tgcred;
368 369
369 kdebug("prepare_usermodehelper_creds() alloc %p", new); 370 kdebug("prepare_usermodehelper_creds() alloc %p", new);
370 371
@@ -397,6 +398,10 @@ struct cred *prepare_usermodehelper_creds(void)
397 398
398error: 399error:
399 put_cred(new); 400 put_cred(new);
401free_tgcred:
402#ifdef CONFIG_KEYS
403 kfree(tgcred);
404#endif
400 return NULL; 405 return NULL;
401} 406}
402 407