mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(fatfs): free allocated memory for base path before unmounting the card
This commit is contained in:
parent
aaa438a3a2
commit
91eada4acc
@ -439,6 +439,8 @@ esp_err_t esp_vfs_fat_sdcard_unmount(const char *base_path, sdmmc_card_t *card)
|
||||
if (!found) {
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
}
|
||||
free(s_ctx[id]->base_path);
|
||||
s_ctx[id]->base_path = NULL;
|
||||
free(s_ctx[id]);
|
||||
s_ctx[id] = NULL;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user