diff --git a/components/fatfs/src/vfs_fat_spiflash.c b/components/fatfs/src/vfs_fat_spiflash.c index 03682e564..b9f80354a 100644 --- a/components/fatfs/src/vfs_fat_spiflash.c +++ b/components/fatfs/src/vfs_fat_spiflash.c @@ -83,6 +83,7 @@ esp_err_t esp_vfs_fat_spiflash_mount(const char* base_path, goto fail; } free(workbuf); + workbuf = NULL; ESP_LOGI(TAG, "Mounting again"); fresult = f_mount(fs, drv, 0); if (fresult != FR_OK) {