Commit 9a32aa87 authored by Xiu Jianfeng's avatar Xiu Jianfeng Committed by Greg Kroah-Hartman
Browse files

apparmor: Fix memleak in alloc_ns()



[ Upstream commit e9e6fa49 ]

After changes in commit a1bd627b ("apparmor: share profile name on
replacement"), the hname member of struct aa_policy is not valid slab
object, but a subset of that, it can not be freed by kfree_sensitive(),
use aa_policy_destroy() to fix it.

Fixes: a1bd627b ("apparmor: share profile name on replacement")
Signed-off-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 417ef568
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment