mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-03 21:14:40 +08:00
dhcp_inform() did not set and unset netif->dhcp. always generated assert failure.
This commit is contained in:
parent
a96a12ed1f
commit
710ac00024
@ -537,6 +537,7 @@ void dhcp_inform(struct netif *netif)
|
|||||||
DEBUGF(DHCP_DEBUG | DBG_TRACE | 2, ("dhcp_inform(): could not allocate dhcp\n"));
|
DEBUGF(DHCP_DEBUG | DBG_TRACE | 2, ("dhcp_inform(): could not allocate dhcp\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
netif->dhcp = dhcp;
|
||||||
memset(dhcp, 0, sizeof(struct dhcp));
|
memset(dhcp, 0, sizeof(struct dhcp));
|
||||||
|
|
||||||
DEBUGF(DHCP_DEBUG | DBG_TRACE, ("dhcp_inform(): allocated dhcp\n"));
|
DEBUGF(DHCP_DEBUG | DBG_TRACE, ("dhcp_inform(): allocated dhcp\n"));
|
||||||
@ -577,6 +578,7 @@ void dhcp_inform(struct netif *netif)
|
|||||||
if (dhcp->pcb != NULL) udp_remove(dhcp->pcb);
|
if (dhcp->pcb != NULL) udp_remove(dhcp->pcb);
|
||||||
dhcp->pcb = NULL;
|
dhcp->pcb = NULL;
|
||||||
mem_free((void *)dhcp);
|
mem_free((void *)dhcp);
|
||||||
|
netif->dhcp = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user