apparmor: Fix ref count leak in task_kill
authorJohn Johansen <john.johansen@canonical.com>
Fri, 29 Dec 2023 14:54:41 +0000 (06:54 -0800)
committerJohn Johansen <john.johansen@canonical.com>
Fri, 29 Dec 2023 14:54:41 +0000 (06:54 -0800)
commit2cb54a19ac7153b9a26a72098c495187f64c2276
treeb8cbcb4e60432f4a91d408bcdf1725b3e567b303
parent1cba275017352ba887058934d23b5c76a3de62ae
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: 90c436a64a6e ("apparmor: pass cred through to audit info.")
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/lsm.c