]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kernel/audit_tree.c: tree will leak memory when failure occurs in audit_trim_trees()
authorChen Gang <gang.chen@asianux.com>
Mon, 29 Apr 2013 22:05:19 +0000 (15:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 May 2013 20:38:03 +0000 (13:38 -0700)
commitd47f90f3cb58908bb6f6720b678e37e57028a590
tree12466ce441fb40c48f211852015f98b51bf25d54
parent07bdcd24805f6c492c5871dac365f7ce0a331044
kernel/audit_tree.c: tree will leak memory when failure occurs in audit_trim_trees()

commit 12b2f117f3bf738c1a00a6f64393f1953a740bd4 upstream.

audit_trim_trees() calls get_tree().  If a failure occurs we must call
put_tree().

[akpm@linux-foundation.org: run put_tree() before mutex_lock() for small scalability improvement]
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Eric Paris <eparis@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/audit_tree.c