btrfs-progs: fix leak of path in reset_balance

A path may leak after an unlikely error condition.

Resolves-coverity-id: 1199474
Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
David Sterba 2015-01-03 03:33:31 +01:00
parent 9623d5549e
commit 70607997ee
1 changed files with 2 additions and 1 deletions

View File

@ -7772,7 +7772,8 @@ reinit_data_reloc:
root = btrfs_read_fs_root(fs_info, &key);
if (IS_ERR(root)) {
fprintf(stderr, "Error reading data reloc tree\n");
return PTR_ERR(root);
ret = PTR_ERR(root);
goto out;
}
record_root_in_trans(trans, root);
ret = btrfs_fsck_reinit_root(trans, root, 0);