apparmor: fix leak of null profile name if profile allocation fails
authorJohn Johansen <john.johansen@canonical.com>
Wed, 15 Nov 2017 23:25:30 +0000 (15:25 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Dec 2017 08:53:06 +0000 (09:53 +0100)
commit897088926c3477ef8d3d299473a2777dd9d1c9cb
tree6a1351ebf81cb940e09b7e83158b3c5b32678f09
parent86d1d015fe06267b60d496971d01c859aaa8ce08
apparmor: fix leak of null profile name if profile allocation fails

[ Upstream commit 4633307e5ed6128975595df43f796a10c41d11c1 ]

Fixes: d07881d2edb0 ("apparmor: move new_null_profile to after profile lookup fns()")
Reported-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
security/apparmor/policy.c