Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apparmor: fix a memleak in multi_transaction_new()
[ Upstream commit c73275c ] 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: 1dea3b4 ("apparmor: speed up transactional queries") Signed-off-by: Gaosheng Cui <[email protected]> Signed-off-by: John Johansen <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
- Loading branch information