From e8c46a566b6010ed936115c12c3ce720cac3eff3 Mon Sep 17 00:00:00 2001 From: yuanjm Date: Mon, 21 Jun 2021 14:37:21 +0800 Subject: [PATCH] sntp: Fix client receive KOD packet that make pool MEMP_SYS_TIMEOUT not be freed Reported as https://savannah.nongnu.org/bugs/?58817 picked from espressif/esp-lwip@1c1642fe Ref IDF-4847 --- src/apps/sntp/sntp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/apps/sntp/sntp.c b/src/apps/sntp/sntp.c index 23731e51..b79783a7 100644 --- a/src/apps/sntp/sntp.c +++ b/src/apps/sntp/sntp.c @@ -528,6 +528,7 @@ sntp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, /* KOD errors are only processed in case of an explicit poll response */ if (sntp_opmode == SNTP_OPMODE_POLL) { /* Kiss-of-death packet. Use another server or increase UPDATE_DELAY. */ + sys_untimeout(sntp_request, NULL); sntp_try_next_server(NULL); } } else {