diff --git a/components/fatfs/src/vfs_fat_sdmmc.c b/components/fatfs/src/vfs_fat_sdmmc.c index 68751cb50..5e79d4a9f 100644 --- a/components/fatfs/src/vfs_fat_sdmmc.c +++ b/components/fatfs/src/vfs_fat_sdmmc.c @@ -128,6 +128,7 @@ esp_err_t esp_vfs_fat_sdmmc_mount(const char* base_path, goto fail; } free(workbuf); + workbuf = NULL; ESP_LOGW(TAG, "mounting again"); res = f_mount(fs, drv, 0); if (res != FR_OK) {