On Fri, Oct 12, 2018 at 04:25:23PM +0800, robbieko wrote: > From: Robbie Ko <robbi...@synology.com> > > super-recover collects btrfs devices information using existed > functions scan_one_devices(). > > Problem is fs_devices is freed twice. One in __open_ctree_fd() when > error happens and the other in btrfs_close_devices(recover.fs_devices) > when root is NULL. > > Commit "30fd6f2e92695c355c8f76b8887cd4fade60cdac" add force-close > all opened device before program exit, to avoid memory leak in all > btrfs sub-command. > Therefore, there is an unnecessary freed of fs_devices in > btrfs_recover_superblocks. > > Fix this problem by remove unnecessary freed of fs_devices. > > Signed-off-by: Robbie Ko <robbi...@synology.com>
The fix for the double free has been in the devel branch, but thanks anyway.