[v2,01/17] btrfs-progs: lowmem check: release path in repair_extent_data_item()
diff mbox

Message ID 20171220045731.19343-2-suy.fnst@cn.fujitsu.com
State New
Headers show

Commit Message

Su Yue Dec. 20, 2017, 4:57 a.m. UTC
In repair_extent_data_item(), path is not be released if some
errors occurs which causes extent buffer leak.

So release path in end of the function.

Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
 cmds-check.c | 1 +
 1 file changed, 1 insertion(+)

diff mbox

diff --git a/cmds-check.c b/cmds-check.c
index 7fc30da83ea1..309ac9553b3a 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -11999,6 +11999,7 @@  static int repair_extent_data_item(struct btrfs_trans_handle *trans,
+	btrfs_release_path(&path);
 	if (ret)
 		error("can't repair root %llu extent data item[%llu %llu]",
 		      root->objectid, disk_bytenr, num_bytes);