Skip to content
Snippets Groups Projects
Commit eb0f78e2 authored by Gaosheng Cui's avatar Gaosheng Cui Committed by Greg Kroah-Hartman
Browse files

apparmor: fix a memleak in multi_transaction_new()


[ Upstream commit c73275cf ]

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: 1dea3b41 ("apparmor: speed up transactional queries")
Signed-off-by: default avatarGaosheng Cui <cuigaosheng1@huawei.com>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent df121012
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment