Open naomai opened 5 months ago
When calling NTP.begin() on client that was previously stopped with NTP.stop(), the device crashes.
NTP.begin()
NTP.stop()
NTPClient::stop only deallocates udp handle using udp_remove, but the pointer is not set to NULL. https://github.com/gmag11/ESPNtpClient/blob/2666fd83941569cb5cc426800e5b62f64f17fbac/src/ESPNtpClient.h#L400-L402
NTPClient::stop
udp
udp_remove
This causes the subsequent NTPClient::begin call to crash because of calling udp functions on deallocated udp_pcb https://github.com/gmag11/ESPNtpClient/blob/2666fd83941569cb5cc426800e5b62f64f17fbac/src/ESPNtpClient.cpp#L174-L179
NTPClient::begin
Thanks for creating a really helpful library! Tomasz
When calling
NTP.begin()
on client that was previously stopped withNTP.stop()
, the device crashes.NTPClient::stop
only deallocatesudp
handle usingudp_remove
, but the pointer is not set to NULL. https://github.com/gmag11/ESPNtpClient/blob/2666fd83941569cb5cc426800e5b62f64f17fbac/src/ESPNtpClient.h#L400-L402This causes the subsequent
NTPClient::begin
call to crash because of calling udp functions on deallocated udp_pcb https://github.com/gmag11/ESPNtpClient/blob/2666fd83941569cb5cc426800e5b62f64f17fbac/src/ESPNtpClient.cpp#L174-L179Thanks for creating a really helpful library! Tomasz