btrfs-progs: Fix a memleak in btrfs_scan_lblkid().

In btrfs_scan_lblkid(), blkid_get_cache() is called but cache not freed.
This patch adds blkid_put_cache() to free it.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
Qu Wenruo 2014-03-14 03:28:11 +00:00 committed by Chris Mason
parent 9d57509e99
commit 87d1676b22

View File

@ -2064,6 +2064,7 @@ int btrfs_scan_lblkid(int update_kernel)
btrfs_register_one_device(path);
}
blkid_dev_iterate_end(iter);
blkid_put_cache(cache);
return 0;
}