aboutsummaryrefslogtreecommitdiffstats
path: root/btrfs-image.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-07-15 16:27:06 +0200
committerDavid Sterba <dsterba@suse.com>2016-07-15 16:27:06 +0200
commit3652782c3bf07865fb807dcee0ad66bca80ba1a3 (patch)
treef78ed2d97b2844ec858228e02be9a45772feeaab /btrfs-image.c
parent048f6274ff0c867363e9734e20f299e53b74ead3 (diff)
downloadbtrfs-progs-3652782c3bf07865fb807dcee0ad66bca80ba1a3.tar.gz
btrfs-progs-3652782c3bf07865fb807dcee0ad66bca80ba1a3.tar.xz
btrfs-progs-3652782c3bf07865fb807dcee0ad66bca80ba1a3.zip
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>
Diffstat (limited to 'btrfs-image.c')
-rw-r--r--btrfs-image.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/btrfs-image.c b/btrfs-image.c
index 6feeb46..af5437b 100644
--- a/btrfs-image.c
+++ b/btrfs-image.c
@@ -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;
}