mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
fs/unionfs: fix memory leak about directory operation
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
@@ -1601,10 +1601,7 @@ static int unionfs_closedir(FAR struct inode *mountpt,
|
|||||||
kmm_free(udir->fu_relpath);
|
kmm_free(udir->fu_relpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
udir->fu_ndx = 0;
|
kmm_free(udir);
|
||||||
udir->fu_relpath = NULL;
|
|
||||||
udir->fu_lower[0] = NULL;
|
|
||||||
udir->fu_lower[1] = NULL;
|
|
||||||
|
|
||||||
/* Decrement the count of open reference. If that count would go to zero
|
/* Decrement the count of open reference. If that count would go to zero
|
||||||
* and if the file system has been unmounted, then destroy the file system
|
* and if the file system has been unmounted, then destroy the file system
|
||||||
|
|||||||
Reference in New Issue
Block a user