From 064d2b4ecbc6a3fbdb1c76049dd159e6673243af Mon Sep 17 00:00:00 2001 From: Xu Chun Guang Date: Wed, 14 Sep 2016 16:14:50 +0800 Subject: [PATCH] dhcpserver: Fix crash when switching wifi mode See Teamwork 7058. --- components/lwip/apps/dhcpserver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; } -- 2.40.0