]> Pileus Git - ~andy/linux/blobdiff - kernel/auditfilter.c
Merge git://git.infradead.org/users/eparis/audit
[~andy/linux] / kernel / auditfilter.c
index bc6595fe952e780faf43d6210d5ec9843e5cbe13..83a2970295d19ffdb1bd7417ed2b1b54a815cba1 100644 (file)
@@ -533,6 +533,10 @@ exit_nofree:
        return entry;
 
 exit_free:
+       if (entry->rule.watch)
+               audit_put_watch(entry->rule.watch); /* matches initial get */
+       if (entry->rule.tree)
+               audit_put_tree(entry->rule.tree); /* that's the temporary one */
        audit_free_rule(entry);
        return ERR_PTR(err);
 }