Merge branch 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / kernel / auditfilter.c
index f9fc54bbe06faa3e845e19871d15ace3e6c5e1b3..267436826c3bc179678a57de72cf08220fa8faca 100644 (file)
@@ -594,6 +594,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);
 }