]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
commita4a1dfa4bb8b1d76d1ed464432ed95bb5956408f
tree549f3f9512323ef101bda671f9f09056e6095927
parent72676bb53f33fd0ef3a1484fc1ecfd306dc6ff40
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