From 5519afe6759302c50ac5199881a877aebc7fb8b8 Mon Sep 17 00:00:00 2001 From: Roland Dobai Date: Tue, 8 Oct 2019 13:17:34 +0200 Subject: [PATCH] Fix memory leak upon failure of esp_vfs_fat_sdmmc_mount() Closes https://github.com/espressif/esp-idf/issues/4165 --- components/fatfs/src/vfs_fat_sdmmc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/fatfs/src/vfs_fat_sdmmc.c b/components/fatfs/src/vfs_fat_sdmmc.c index f31790e0f6..094f68d51f 100644 --- a/components/fatfs/src/vfs_fat_sdmmc.c +++ b/components/fatfs/src/vfs_fat_sdmmc.c @@ -157,6 +157,8 @@ fail: ff_diskio_unregister(pdrv); free(s_card); s_card = NULL; + free(s_base_path); + s_base_path = NULL; return err; }