All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] ocfs2: free path in ocfs2_remove_inode_range()
@ 2013-08-02  9:14 Younger Liu
  2013-08-06  6:23 ` Jeff Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Younger Liu @ 2013-08-02  9:14 UTC (permalink / raw)
  To: ocfs2-devel

In ocfs2_remove_inode_range(), there is a memory leak.
The variable path has allocated memory with ocfs2_new_path_from_et(), 
but it is not free.

Signed-off-by: Younger Liu <younger.liu@huawei.com>
---
 fs/ocfs2/file.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 833a09b..2d1a227 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1796,6 +1796,7 @@ static int ocfs2_remove_inode_range(struct inode *inode,
 	ocfs2_truncate_cluster_pages(inode, byte_start, byte_len);
 
 out:
+	ocfs2_free_path(path);
 	ocfs2_schedule_truncate_log_flush(osb, 1);
 	ocfs2_run_deallocs(osb, &dealloc);
 
-- 
1.7.9.7

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-06  6:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-02  9:14 [Ocfs2-devel] [PATCH] ocfs2: free path in ocfs2_remove_inode_range() Younger Liu
2013-08-06  6:23 ` Jeff Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.