Skip to content

Commit

Permalink
CRED: Missing put_cred() in prepare_kernel_cred()
Browse files Browse the repository at this point in the history
Missing put_cred() in the error handling path of prepare_kernel_cred().

Signed-off-by: David Howells <[email protected]>
Acked-by: Steve Dickson <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dhowells authored and torvalds committed Jan 9, 2009
1 parent 29a41e9 commit 0de3368
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/cred.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ struct cred *prepare_kernel_cred(struct task_struct *daemon)

error:
put_cred(new);
put_cred(old);
return NULL;
}
EXPORT_SYMBOL(prepare_kernel_cred);
Expand Down

0 comments on commit 0de3368

Please sign in to comment.