summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/move_extents.c
diff options
context:
space:
mode:
authorJie Liu <jeff.liu@oracle.com>2013-09-11 23:19:53 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-12 00:56:44 +0200
commit4704aa30fc35010dd9c3ce1d9d2e77af09c2c081 (patch)
tree9a506a85ce98233f7b5092fb6f57793d2922046a /fs/ocfs2/move_extents.c
parentocfs2: add missing return value check of ocfs2_get_clusters() (diff)
downloadlinux-4704aa30fc35010dd9c3ce1d9d2e77af09c2c081.tar.xz
linux-4704aa30fc35010dd9c3ce1d9d2e77af09c2c081.zip
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>
Diffstat (limited to 'fs/ocfs2/move_extents.c')
-rw-r--r--fs/ocfs2/move_extents.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c
index 415928536c5e..3d3f3c83065c 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;
}