]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
UBUNTU: SAUCE: apparmor: fix ns ref count link when removing profiles from policy
authorJohn Johansen <john.johansen@canonical.com>
Wed, 18 Jan 2017 09:23:11 +0000 (01:23 -0800)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 20 Feb 2017 03:57:58 +0000 (20:57 -0700)
BugLink: http://bugs.launchpad.net/bugs/1660849
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
security/apparmor/policy.c

index afa5984d91b892bbafbb7b87e31b1b16125d6859..f2ffcf109e28b0efd8cd2fa66f53a5e723657e62 100644 (file)
@@ -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);