]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2/cluster: fix memory leak in o2hb_region_release
authorJoseph Qi <joseph.qi@huawei.com>
Wed, 3 Feb 2016 00:57:21 +0000 (16:57 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Feb 2016 16:28:43 +0000 (08:28 -0800)
commita0fd43eb33c590dc290abe71f984a11b5260bc18
tree549f3f9512323ef101bda671f9f09056e6095927
parent02ae9adf3c6acb79cd8d984638132d82827cd1d9
ocfs2/cluster: fix memory leak in o2hb_region_release

o2hb_region_release currently doesn't free o2hb_debug_buf
hr_db_elapsed_time and hr_db_pinned malloced in o2hb_debug_create.  Also
we should call debugfs_remove before freeing its data, to prevent the risk
accessing debugfs rightly after its data has been freed.

Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Reviewed-by: Jiufei Xue <xuejiufei@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/cluster/heartbeat.c