Skip to contentSkip to conversation

ocfs2: fix a memory leak at __ocfs2_move_extents()

PATCH New Jeff Liu 2 participants 2 messages Aug 6, 2013 OCFS2

lore
Share & tools
lore

Jeff Liu

author
#0 lore raw

PATCH 1/1 ocfs2: fix a memory leak at __ocfs2_move_extents()

From: Jie Liu <[email protected]>

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.

Cc Younger Liu <[email protected]>
---
 fs/ocfs2/move_extents.c |    1 +
 1 file changed, 1 insertion(+)
fs/ocfs2/move_extents.c +1 -0
index f1fc172..37231d1 100644
@@ -152,6 +152,7 @@ static int __ocfs2_move_extent(handle_t *handle,
 	}
 
 out:
+	ocfs2_free_path(path);
 	return ret;
 }
 
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 ocfs2: fix a memory leak at __ocfs2_move_extents()

Quoted 9 lines · Jeff Liu

From: Jie Liu <[email protected]>

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.

Cc Younger Liu <[email protected]>

This patch looks fine to me.

Quoted 17 lines
---
 fs/ocfs2/move_extents.c |    1 +
 1 file changed, 1 insertion(+)
fs/ocfs2/move_extents.c +1 -0
index f1fc172..37231d1 100644
@@ -152,6 +152,7 @@ static int __ocfs2_move_extent(handle_t *handle,
 	}
 
 out:
+	ocfs2_free_path(path);
 	return ret;
 }