fs/unionfs: fix memory leak about directory operation
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
8a8e115623
commit
0740ebb21b
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user