Fixes SD begin() end() memory leak #2897 (#5419)

This commit is contained in:
Rodrigo Garcia 2021-07-19 13:08:51 -03:00 committed by GitHub
parent 6393dbc91b
commit 4a0305a05e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -703,6 +703,7 @@ uint8_t sdcard_uninit(uint8_t pdrv)
esp_err_t err = ESP_OK; esp_err_t err = ESP_OK;
if (card->base_path) { if (card->base_path) {
err = esp_vfs_fat_unregister_path(card->base_path); err = esp_vfs_fat_unregister_path(card->base_path);
free(card->base_path);
} }
free(card); free(card);
return err; return err;