fixed the memory leak in dfs_elm.c found by hezlog@gmail.com
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2292 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
d189f8c189
commit
6864f3a38b
@ -309,6 +309,9 @@ int dfs_elm_open(struct dfs_fd *file)
|
|||||||
fd = (FIL *)rt_malloc(sizeof(FIL));
|
fd = (FIL *)rt_malloc(sizeof(FIL));
|
||||||
if (fd == RT_NULL)
|
if (fd == RT_NULL)
|
||||||
{
|
{
|
||||||
|
#if _VOLUMES > 1
|
||||||
|
rt_free(drivers_fn);
|
||||||
|
#endif
|
||||||
return -DFS_STATUS_ENOMEM;
|
return -DFS_STATUS_ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user