summaryrefslogtreecommitdiff
path: root/cmds-restore.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-04-23 16:40:07 +0200
committerDavid Sterba <dsterba@suse.cz>2015-04-24 15:42:05 +0200
commita8762e43fd6e9ac927e81c13add49a3edcbfcb08 (patch)
tree49e72cb73fb11c391edfea8a94b55a97d36fdef9 /cmds-restore.c
parent9a86668071e77b2da0173b8921153de4d7ba99d8 (diff)
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>
Diffstat (limited to 'cmds-restore.c')
-rw-r--r--cmds-restore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-restore.c b/cmds-restore.c
index 44581df3..808d1f17 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -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;
}