Closed earlephilhower closed 7 years ago
Oops, this one accidentally included the other commit I'd sent in.
I'll submit a new PR later tonight from a clean branch to avoid it pulling in bc27f4b . Looks like I'll need to destroy my existing repo and re-fork, but it shouldn't be a big deal.
@Jeroen88 found a memory leak in axtls where the new ext_host_name pointer was leaking on every SSL reconnection, eventually eating up all RAM and crashing the chip (see https://github.com/esp8266/Arduino/issues/3428 ).
This patch just checks if we actually set a host name (strdup()d on the heap), and if so just frees it on the ssl_ext_free call. This should eliminate the leakage.