kernel/auditfilter.c: fix leak in audit_add_rule() error path
authorChen Gang <[email protected]>
Mon, 8 Jul 2013 22:59:38 +0000 (15:59 -0700)
committerLinus Torvalds <[email protected]>
Tue, 9 Jul 2013 17:33:19 +0000 (10:33 -0700)
commit2f992ee85aaa7dfd2bda43efe4493af1e108d054
tree607b66c6814020bb9aa7c0ffe1e3d4fd872efbb5
parent6beb8a23b50d38a003e80c5f16b50c56e8ae3387
kernel/auditfilter.c: fix leak in audit_add_rule() error path

If both 'tree' and 'watch' are valid we must call audit_put_tree(), just
like the preceding code within audit_add_rule().

Signed-off-by: Chen Gang <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Eric Paris <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/auditfilter.c