btrfs-progs: don't leak multi-bio in find_root()
authorZach Brown <zab@redhat.com>
Thu, 24 Jan 2013 18:38:28 +0000 (10:38 -0800)
committerZach Brown <zab@redhat.com>
Wed, 6 Feb 2013 00:09:40 +0000 (16:09 -0800)
It wasn't freed if it didn't find metadata.

Signed-off-by: Zach Brown <zab@redhat.com>
find-root.c

index 51e9a23..f5ca095 100644 (file)
@@ -385,6 +385,7 @@ static int find_root(struct btrfs_root *root)
 
                if (!(type & BTRFS_BLOCK_GROUP_METADATA)) {
                        offset += map_length;
+                       kfree(multi);
                        continue;
                }