Skip to content
Commit e9e6fa49 authored by Xiu Jianfeng's avatar Xiu Jianfeng Committed by John Johansen
Browse files

apparmor: Fix memleak in alloc_ns()

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>
parent 3265949f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment