btrfs-progs: Fix a memleak in btrfs_scan_one_device.
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Fri, 14 Mar 2014 03:28:11 +0000 (03:28 +0000)
committerChris Mason <clm@fb.com>
Fri, 21 Mar 2014 16:51:31 +0000 (09:51 -0700)
commit9d57509e99a65732e9905402b36ea8b8d591e541
tree35e9b88051f6ab3df978ef21aea9244881bde078
parent64200e4453f0f23bef42919db7854b6e8ed2ceda
btrfs-progs: Fix a memleak in btrfs_scan_one_device.

Valgrind reports memleak in btrfs_scan_one_device() about allocating
btrfs_device but on btrfs_close_devices() they are not reclaimed.

Although not a bug since after btrfs_close_devices() btrfs will exit so
memory will be reclaimed by system anyway, it's better to fix it anyway.

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>
cmds-filesystem.c
volumes.c