summaryrefslogtreecommitdiff
path: root/mm/dmapool.c
diff options
context:
space:
mode:
authorXiu Jianfeng <xiujianfeng@huawei.com>2022-10-21 12:36:02 +0300
committerJohn Johansen <john.johansen@canonical.com>2022-10-25 10:15:19 +0300
commit3265949f7cd36a724a35020202c618094be1cf28 (patch)
treef3c973e9357a5bcce469549689065b222e660275 /mm/dmapool.c
parent7dd426e33e2f9275ac03a306efdc89aa86515a52 (diff)
downloadlinux-3265949f7cd36a724a35020202c618094be1cf28.tar.xz
apparmor: Fix memleak issue in unpack_profile()
Before aa_alloc_profile(), it has allocated string for @*ns_name if @tmpns is not NULL, so directly return -ENOMEM if aa_alloc_profile() failed will cause a memleak issue, and even if aa_alloc_profile() succeed, in the @fail_profile tag of aa_unpack(), it need to free @ns_name as well, this patch fixes them. Fixes: 736ec752d95e ("AppArmor: policy routines for loading and unpacking policy") Fixes: 04dc715e24d0 ("apparmor: audit policy ns specified in policy load") Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'mm/dmapool.c')
0 files changed, 0 insertions, 0 deletions