btrfs-progs: restore: fix path leak in copy_metadata

The path lifecycle spans only this function and we have to free it.

Resolves-coverity-id: 1295367
Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
David Sterba 2015-04-23 16:40:07 +02:00
parent 9a86668071
commit a8762e43fd

View File

@ -612,7 +612,7 @@ static int copy_metadata(struct btrfs_root *root, int fd,
}
}
out:
btrfs_release_path(path);
btrfs_free_path(path);
return ret;
}