Remove memory leak on multiple calls to initCertStore by earlephilhower · Pull Request #7021 · esp8266/Arduino (original) (raw)
In some cases, initCertStore
may need to be called multiple times
(i.e. to update certs w/oa reboot). In that case, the saved file names
leaked when the new ones were malloc()
'd.
Fix by freeing the old strings, if present.