fatfs: fix double free in bailout path of esp_vfs_fat_sdmmc_mount

Fixes https://github.com/espressif/esp-idf/issues/1370
This commit is contained in:
Ivan Grokhotkov 2017-12-11 11:06:29 +08:00
parent a0776b2f21
commit c778951547

View file

@ -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) {