Skip to content

Commit 2cb54a1

Browse files
committed
apparmor: Fix ref count leak in task_kill
apparmor_task_kill was not putting the task_cred reference tc, or the cred_label reference tc when dealing with a passed in cred, fix this by using a single fn exit. Fixes: 90c436a ("apparmor: pass cred through to audit info.") Signed-off-by: John Johansen <john.johansen@canonical.com>
1 parent 1cba275 commit 2cb54a1

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

security/apparmor/lsm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,6 @@ static int apparmor_task_kill(struct task_struct *target, struct kernel_siginfo
954954
cl = aa_get_newest_cred_label(cred);
955955
error = aa_may_signal(cred, cl, tc, tl, sig);
956956
aa_put_label(cl);
957-
return error;
958957
} else {
959958
cl = __begin_current_label_crit_section();
960959
error = aa_may_signal(current_cred(), cl, tc, tl, sig);

0 commit comments

Comments
 (0)