提交 4421ec8c 编写于 作者: qiuyiuestc's avatar qiuyiuestc

fix memory leak issue in unmount function

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1999 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 12b5e56f
...@@ -370,6 +370,9 @@ int dfs_unmount(const char *specialfile) ...@@ -370,6 +370,9 @@ int dfs_unmount(const char *specialfile)
if (fs->dev_id != RT_NULL) if (fs->dev_id != RT_NULL)
rt_device_close(fs->dev_id); rt_device_close(fs->dev_id);
if (fs->path != RT_NULL)
rt_free(fs->path);
/* clear this filesystem table entry */ /* clear this filesystem table entry */
rt_memset(fs, 0, sizeof(struct dfs_filesystem)); rt_memset(fs, 0, sizeof(struct dfs_filesystem));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册