]> granicus.if.org Git - esp-idf/commitdiff
vfs: fix double free.
authorQuentin Thérond <q.therond@overkiz.com>
Tue, 25 Jul 2017 12:14:23 +0000 (14:14 +0200)
committerAngus Gratton <gus@projectgus.com>
Wed, 30 Aug 2017 02:11:57 +0000 (12:11 +1000)
components/fatfs/src/vfs_fat_spiflash.c

index 03682e564eb7e2519e4aa2e4f3f8414f59339aa4..b9f80354a14fcad755de8f93240ccba525005914 100644 (file)
@@ -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) {