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:
qiuyiuestc@gmail.com 2012-03-17 11:22:51 +00:00
parent 12b5e56f46
commit 4421ec8c64
1 changed files with 3 additions and 0 deletions

View File

@ -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));