btrfs-progs: image: fix minor resource leak

It's on error exit path.

Resolves-coverity-id: 1354246
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2016-07-15 16:27:06 +02:00
parent 048f6274ff
commit 3652782c3b

View File

@ -2598,6 +2598,7 @@ static int restore_metadump(const char *input, FILE *out, int old_restore,
if (stat(target, &st)) {
fprintf(stderr, "statting %s failed\n", target);
close_ctree(info->chunk_root);
free(cluster);
return 1;
}