Message ID | 20170331125744.16986-9-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);