linux/security
Xiu Jianfeng 417ea9fe97 apparmor: Fix memleak in aa_simple_write_to_buffer()
When copy_from_user failed, the memory is freed by kvfree. however the
management struct and data blob are allocated independently, so only
kvfree(data) cause a memleak issue here. Use aa_put_loaddata(data) to
fix this issue.

Fixes: a6a52579e52b5 ("apparmor: split load data into management struct and data blob")
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2022-07-09 15:13:59 -07:00
..
2020-11-06 08:08:37 -08:00
2022-05-24 13:50:39 -07:00
2022-05-24 13:16:50 -07:00
2022-05-16 16:02:21 -07:00
2022-05-24 13:06:32 -07:00
2022-05-03 16:09:03 -04:00
2022-05-24 13:09:13 -07:00