diff options
author | Zhao Lei <zhaolei@cn.fujitsu.com> | 2015-10-26 18:28:20 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2015-11-02 09:35:08 +0100 |
commit | e72cb5de1211cedc0af2fd9ea4d7535d35c34f76 (patch) | |
tree | 2ff8eb1321dda81479addd3c648976484bb05016 /btrfs-debug-tree.c | |
parent | da34dbd14936a4c6183be14b7db09f0d6e49cf09 (diff) |
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-debug-tree.c')
-rw-r--r-- | btrfs-debug-tree.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/btrfs-debug-tree.c b/btrfs-debug-tree.c index 7d8e876f..8adc39fa 100644 --- a/btrfs-debug-tree.c +++ b/btrfs-debug-tree.c @@ -28,6 +28,7 @@ #include "disk-io.h" #include "print-tree.h" #include "transaction.h" +#include "volumes.h" #include "utils.h" static int print_usage(int ret) @@ -428,5 +429,7 @@ no_node: printf("uuid %s\n", uuidbuf); printf("%s\n", PACKAGE_STRING); close_root: - return close_ctree(root); + ret = close_ctree(root); + btrfs_close_all_devices(); + return ret; } |