From: Xu Chun Guang Date: Wed, 14 Sep 2016 08:14:50 +0000 (+0800) Subject: dhcpserver: Fix crash when switching wifi mode X-Git-Tag: v0.9~43^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=064d2b4ecbc6a3fbdb1c76049dd159e6673243af;p=esp-idf dhcpserver: Fix crash when switching wifi mode See Teamwork 7058. --- diff --git a/components/lwip/apps/dhcpserver.c b/components/lwip/apps/dhcpserver.c index ca0592c917..4cdef4123d 100644 --- a/components/lwip/apps/dhcpserver.c +++ b/components/lwip/apps/dhcpserver.c @@ -1070,9 +1070,8 @@ void dhcps_stop(struct netif *netif) return; } - udp_disconnect(pcb_dhcps); - if (apnetif->dhcps_pcb != NULL) { + udp_disconnect(apnetif->dhcps_pcb); udp_remove(apnetif->dhcps_pcb); apnetif->dhcps_pcb = NULL; }