diff options
author | Gaosheng Cui <cuigaosheng1@huawei.com> | 2022-08-23 04:15:03 +0300 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2022-10-04 00:48:54 +0300 |
commit | c73275cf6834787ca090317f1d20dbfa3b7f05aa (patch) | |
tree | f4f9f85efcdd62d31e8f6789da75b99b538a86e9 /security/apparmor/policy.c | |
parent | 3cc40a443a04d52b0c95255dce264068b01e9bfe (diff) | |
download | linux-c73275cf6834787ca090317f1d20dbfa3b7f05aa.tar.xz |
apparmor: fix a memleak in multi_transaction_new()
In multi_transaction_new(), the variable t is not freed or passed out
on the failure of copy_from_user(t->data, buf, size), which could lead
to a memleak.
Fix this bug by adding a put_multi_transaction(t) in the error path.
Fixes: 1dea3b41e84c5 ("apparmor: speed up transactional queries")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/policy.c')
0 files changed, 0 insertions, 0 deletions