]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
UBUNTU: SAUCE: Revert "apparmor: Fix memory leak of rule on error exit path"
authorJohn Johansen <john.johansen@canonical.com>
Thu, 14 Mar 2019 22:38:18 +0000 (15:38 -0700)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 25 Nov 2019 13:56:39 +0000 (14:56 +0100)
Revert currently unused by Ubuntu apparmor features that require secid
support, to enable apparmor LSM stacking with the 5.1 LSM stacking
patchset.

This reverts commit 52e8c38001d8ef0ca07ef428e480cd4a35e46abf.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
security/apparmor/audit.c

index 5a98661a8b46ea2daf47a3386d2fe181622a977b..966e796459fe2709669dc00408dee61fb1359609 100644 (file)
@@ -196,12 +196,10 @@ int aa_audit_rule_init(u32 field, u32 op, char *rulestr, void **vrule)
        /* Currently rules are treated as coming from the root ns */
        rule->label = aa_label_parse(&root_ns->unconfined->label, rulestr,
                                     GFP_KERNEL, true, false);
-       if (IS_ERR(rule->label)) {
-               aa_audit_rule_free(rule);
+       if (IS_ERR(rule->label))
                return PTR_ERR(rule->label);
-       }
-
        *vrule = rule;
+
        return 0;
 }