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

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

Commit Message

Su Yue Jan. 11, 2018, 7:34 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.

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

Patch
diff mbox

diff --git a/cmds-check.c b/cmds-check.c
index 5fc0ea9d4f4d..ba2048004054 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -12005,6 +12005,7 @@  static int repair_extent_data_item(struct btrfs_trans_handle *trans,
 
 	err &= ~BACKREF_MISSING;
 out:
+	btrfs_release_path(&path);
 	if (ret)
 		error("can't repair root %llu extent data item[%llu %llu]",
 		      root->objectid, disk_bytenr, num_bytes);