]> git.proxmox.com Git - mirror_ubuntu-disco-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)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 26 Mar 2019 14:54:22 +0000 (09:54 -0500)
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 eeaddfe0c0fb9c3999453451de1899db81a9ad84..575f3e9c8c80a5921b492b70566afc33fe37f324 100644 (file)
@@ -200,12 +200,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;
 }