From 4421ec8c64c564296bd2074d64017b271aec5f05 Mon Sep 17 00:00:00 2001 From: "qiuyiuestc@gmail.com" Date: Sat, 17 Mar 2012 11:22:51 +0000 Subject: [PATCH] fix memory leak issue in unmount function git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1999 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- components/dfs/src/dfs_fs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/dfs/src/dfs_fs.c b/components/dfs/src/dfs_fs.c index c4681746e..d73cfa5d1 100644 --- a/components/dfs/src/dfs_fs.c +++ b/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));