From: Quentin Thérond Date: Tue, 25 Jul 2017 12:14:23 +0000 (+0200) Subject: vfs: fix double free. X-Git-Tag: v3.1-dev~341^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=88e71a680ea3a50cbc9eabab6981baa86ef69ce6;p=esp-idf vfs: fix double free. --- diff --git a/components/fatfs/src/vfs_fat_spiflash.c b/components/fatfs/src/vfs_fat_spiflash.c index 03682e564e..b9f80354a1 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) {