[PATCH v2 4/5] btrfs-progs: Add missing close_ctree to btrfs-select-super.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add missing close_ctree() to btrfs-select-super.c to avoid memory leak.

Signed-off-by: Zhao Lei <zhaolei@xxxxxxxxxxxxxx>
---
 btrfs-select-super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/btrfs-select-super.c b/btrfs-select-super.c
index bd44978..df74153 100644
--- a/btrfs-select-super.c
+++ b/btrfs-select-super.c
@@ -102,6 +102,7 @@ int main(int ac, char **av)
 	 */
 	printf("using SB copy %llu, bytenr %llu\n", (unsigned long long)num,
 	       (unsigned long long)bytenr);
+	close_ctree(root);
 	btrfs_close_all_devices();
 	return ret;
 }
-- 
1.8.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux