Browse Source

fix memory leak issue in unmount function

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1999 bbd45198-f89e-11dd-88c7-29a3b14d5316
qiuyiuestc@gmail.com 13 years ago
parent
commit
4421ec8c64
1 changed files with 3 additions and 0 deletions
  1. 3 0
      components/dfs/src/dfs_fs.c

+ 3 - 0
components/dfs/src/dfs_fs.c

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