Commit a9cfa10d authored by Colin Ian King's avatar Colin Ian King Committed by Seth Forshee
Browse files

apparmor: fix memory leak on buffer on error exit path

BugLink: http://bugs.launchpad.net/bugs/1763427



Currently on the error exit path the allocated buffer is not free'd
causing a memory leak. Fix this by kfree'ing it.

Detected by CoverityScan, CID#1466876 ("Resource leaks")

Fixes: 1180b4c7 ("apparmor: fix dangling symlinks to policy rawdata after replacement")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
(cherry picked from commit 588558eb
 git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor

)
Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
parent 29e1dd6b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment