fix memory leak issue in unmount function
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1999 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
12b5e56f46
commit
4421ec8c64
|
@ -370,6 +370,9 @@ int dfs_unmount(const char *specialfile)
|
|||
if (fs->dev_id != RT_NULL)
|
||||
rt_device_close(fs->dev_id);
|
||||
|
||||
if (fs->path != RT_NULL)
|
||||
rt_free(fs->path);
|
||||
|
||||
/* clear this filesystem table entry */
|
||||
rt_memset(fs, 0, sizeof(struct dfs_filesystem));
|
||||
|
||||
|
|
Loading…
Reference in New Issue