summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
author[email protected] <[email protected]>2012-09-17 02:33:18 +0000
committer[email protected] <[email protected]>2012-09-17 02:33:18 +0000
commit6864f3a38bf741fa8334e1cc1c71d49d2ad7821a (patch)
treea3aa2c52424a0d18ed0328bcaa893e4d6b7d41e7 /components
parentd189f8c18998095412c3ff1a218d6fbc03809bed (diff)
fixed the memory leak in dfs_elm.c found by [email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2292 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components')
-rw-r--r--components/dfs/filesystems/elmfat/dfs_elm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/components/dfs/filesystems/elmfat/dfs_elm.c b/components/dfs/filesystems/elmfat/dfs_elm.c
index a8c724d8ad..7c4ecb1baf 100644
--- a/components/dfs/filesystems/elmfat/dfs_elm.c
+++ b/components/dfs/filesystems/elmfat/dfs_elm.c
@@ -309,6 +309,9 @@ int dfs_elm_open(struct dfs_fd *file)
fd = (FIL *)rt_malloc(sizeof(FIL));
if (fd == RT_NULL)
{
+#if _VOLUMES > 1
+ rt_free(drivers_fn);
+#endif
return -DFS_STATUS_ENOMEM;
}