Skip to content

Commit 4a0305a

Browse files
authored
Fixes SD begin() end() memory leak #2897 (#5419)
1 parent 6393dbc commit 4a0305a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libraries/SD/src/sd_diskio.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,7 @@ uint8_t sdcard_uninit(uint8_t pdrv)
703703
esp_err_t err = ESP_OK;
704704
if (card->base_path) {
705705
err = esp_vfs_fat_unregister_path(card->base_path);
706+
free(card->base_path);
706707
}
707708
free(card);
708709
return err;

0 commit comments

Comments
 (0)