From: Jie Liu <jeff.liu@oracle.com> Date: Wed, 11 Sep 2013 21:19:53 +0000 (-0700) Subject: ocfs2: fix a memory leak in __ocfs2_move_extents() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4704aa30fc35010dd9c3ce1d9d2e77af09c2c081;p=linux.git ocfs2: fix a memory leak in __ocfs2_move_extents() The ocfs2 path is not properly freed which leads to a memory leak at __ocfs2_move_extents(). This patch stops the leaks of the ocfs2_path structure. Signed-off-by: Jie Liu <jeff.liu@oracle.com> Reviewed-by: Younger Liu <younger.liu@huawei.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Mark Fasheh <mfasheh@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> --- diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c index 415928536c5e9..3d3f3c83065ca 100644 --- a/fs/ocfs2/move_extents.c +++ b/fs/ocfs2/move_extents.c @@ -152,6 +152,7 @@ static int __ocfs2_move_extent(handle_t *handle, } out: + ocfs2_free_path(path); return ret; }