Message ID | 20170201090606.22422-13-john.johansen@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c index afa5984..f2ffcf1 100644 --- a/security/apparmor/policy.c +++ b/security/apparmor/policy.c @@ -1104,11 +1104,13 @@ ssize_t aa_remove_profiles(struct aa_ns *view, struct aa_label *label, /* don't fail removal if audit fails */ (void) audit_policy(label, OP_PROF_RM, ns_name, name, info, error); + aa_put_ns(ns); aa_put_profile(profile); return size; fail_ns_lock: mutex_unlock(&ns->lock); + aa_put_ns(ns); fail: (void) audit_policy(label, OP_PROF_RM, ns_name, name, info, error);
BugLink: http://bugs.launchpad.net/bugs/1660849 Signed-off-by: John Johansen <john.johansen@canonical.com> --- security/apparmor/policy.c | 2 ++ 1 file changed, 2 insertions(+)