aboutsummaryrefslogtreecommitdiffstats
path: root/btrfs-find-root.c
diff options
context:
space:
mode:
authorZhao Lei <zhaolei@cn.fujitsu.com>2015-10-26 18:28:20 +0800
committerDavid Sterba <dsterba@suse.com>2015-11-02 09:35:08 +0100
commite72cb5de1211cedc0af2fd9ea4d7535d35c34f76 (patch)
tree2ff8eb1321dda81479addd3c648976484bb05016 /btrfs-find-root.c
parentda34dbd14936a4c6183be14b7db09f0d6e49cf09 (diff)
downloadbtrfs-progs-e72cb5de1211cedc0af2fd9ea4d7535d35c34f76.tar.gz
btrfs-progs-e72cb5de1211cedc0af2fd9ea4d7535d35c34f76.tar.xz
btrfs-progs-e72cb5de1211cedc0af2fd9ea4d7535d35c34f76.zip
btrfs-progs: Add all missing btrfs_close_all_devices to standalone tools
This patch add all missing btrfs_close_all_devices() to standalone tools in btrfs progs, to avoid memory leak. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'btrfs-find-root.c')
-rw-r--r--btrfs-find-root.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/btrfs-find-root.c b/btrfs-find-root.c
index 01b3603..fc3812c 100644
--- a/btrfs-find-root.c
+++ b/btrfs-find-root.c
@@ -216,5 +216,6 @@ int main(int argc, char **argv)
out:
btrfs_find_root_free(&result);
close_ctree(root);
+ btrfs_close_all_devices();
return ret;
}