From: Younger Liu Date: Wed, 11 Sep 2013 21:19:59 +0000 (-0700) Subject: ocfs2: free path in ocfs2_remove_inode_range() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7aebff18b91ebdefe15bb7d3f5d711df8312a7fb;p=openwrt%2Fstaging%2Fblogic.git ocfs2: free path in ocfs2_remove_inode_range() 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 Reviewed-by: Jie Liu Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 409c549ae02a..4f8197caa487 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);