Fix memory leak upon failure of esp_vfs_fat_sdmmc_mount()
Closes https://github.com/espressif/esp-idf/issues/4165
This commit is contained in:
parent
d91272f280
commit
c934e026b5
1 changed files with 2 additions and 0 deletions
|
@ -157,6 +157,8 @@ fail:
|
||||||
ff_diskio_unregister(pdrv);
|
ff_diskio_unregister(pdrv);
|
||||||
free(s_card);
|
free(s_card);
|
||||||
s_card = NULL;
|
s_card = NULL;
|
||||||
|
free(s_base_path);
|
||||||
|
s_base_path = NULL;
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue