diff --git a/components/fatfs/src/vfs_fat_sdmmc.c b/components/fatfs/src/vfs_fat_sdmmc.c index f31790e0f..094f68d51 100644 --- a/components/fatfs/src/vfs_fat_sdmmc.c +++ b/components/fatfs/src/vfs_fat_sdmmc.c @@ -157,6 +157,8 @@ fail: ff_diskio_unregister(pdrv); free(s_card); s_card = NULL; + free(s_base_path); + s_base_path = NULL; return err; }