From 8d4e1c0616ad3b15b31ebc084f0ea3e7e3104804 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 b667aa19f..131a0493a 100644 --- a/components/fatfs/src/vfs_fat_sdmmc.c +++ b/components/fatfs/src/vfs_fat_sdmmc.c @@ -158,6 +158,8 @@ fail: ff_diskio_unregister(pdrv); free(s_card); s_card = NULL; + free(s_base_path); + s_base_path = NULL; return err; }