diff options
author | 2022-10-21 17:36:02 +0800 | |
---|---|---|
committer | 2022-10-25 00:15:19 -0700 | |
commit | 3265949f7cd36a724a35020202c618094be1cf28 (patch) | |
tree | f3c973e9357a5bcce469549689065b222e660275 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | apparmor: fix a memleak in free_ruleset() (diff) | |
download | wireguard-linux-3265949f7cd36a724a35020202c618094be1cf28.tar.xz wireguard-linux-3265949f7cd36a724a35020202c618094be1cf28.zip |
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 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions