]> granicus.if.org Git - esp-idf/commitdiff
Fix memory leak upon failure of esp_vfs_fat_sdmmc_mount()
authorRoland Dobai <roland@espressif.com>
Tue, 8 Oct 2019 11:17:34 +0000 (13:17 +0200)
committerRoland Dobai <dobai.roland@gmail.com>
Fri, 18 Oct 2019 08:27:37 +0000 (10:27 +0200)
Closes https://github.com/espressif/esp-idf/issues/4165

components/fatfs/vfs/vfs_fat_sdmmc.c

index 97928f7d02174a19ea5f9d97e35f6f0a05623b09..888f920622db376c7ffb66f77ebe392211484c1b 100644 (file)
@@ -159,6 +159,8 @@ fail:
     ff_diskio_unregister(pdrv);
     free(s_card);
     s_card = NULL;
+    free(s_base_path);
+    s_base_path = NULL;
     return err;
 }