aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cred.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/cred.c b/kernel/cred.c
index ff7bc071991c..043f78c133c4 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -506,6 +506,7 @@ struct cred *prepare_kernel_cred(struct task_struct *daemon)
506 else 506 else
507 old = get_cred(&init_cred); 507 old = get_cred(&init_cred);
508 508
509 *new = *old;
509 get_uid(new->user); 510 get_uid(new->user);
510 get_group_info(new->group_info); 511 get_group_info(new->group_info);
511 512
@@ -529,6 +530,7 @@ struct cred *prepare_kernel_cred(struct task_struct *daemon)
529 530
530error: 531error:
531 put_cred(new); 532 put_cred(new);
533 put_cred(old);
532 return NULL; 534 return NULL;
533} 535}
534EXPORT_SYMBOL(prepare_kernel_cred); 536EXPORT_SYMBOL(prepare_kernel_cred);