BTRFS: Fix memory leak

Missing delete for some tree roots.

Signed-off-by: Augustin Cavalier <[email protected]>
This commit is contained in:
hyche
2017-12-10 11:02:55 -05:00
committed by Augustin Cavalier
parent 0deb03560f
commit 8137f447cb
@@ -439,12 +439,16 @@ status_t
Volume::Unmount() Volume::Unmount()
{ {
TRACE("Volume::Unmount()\n"); TRACE("Volume::Unmount()\n");
delete fRootTree;
delete fExtentTree; delete fExtentTree;
delete fChunkTree;
delete fChecksumTree; delete fChecksumTree;
delete fFSTree; delete fFSTree;
delete fDevTree; delete fDevTree;
delete fExtentAllocator; delete fExtentAllocator;
fRootTree = NULL;
fExtentTree = NULL; fExtentTree = NULL;
fChunkTree = NULL;
fChecksumTree = NULL; fChecksumTree = NULL;
fFSTree = NULL; fFSTree = NULL;
fDevTree = NULL; fDevTree = NULL;