This commit is contained in:
刘可亮
2025-07-22 11:15:46 +08:00
parent d164b333ed
commit 11c97ef399
2870 changed files with 951307 additions and 26675 deletions

View File

@@ -466,7 +466,11 @@ int dfs_elm_close(struct dfs_fd *file)
fd = (FIL *)(file->data);
RT_ASSERT(fd != RT_NULL);
result = f_close(fd);
if (file->fs && file->fs->data)
{
/* close file if fs is not unmount */
result = f_close(fd);
}
if (result == FR_OK)
{
/* release memory */