mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-28 00:15:16 +00:00
fixed bug #24480 (releasing old udp_pdb and pbuf in dhcp_start)
This commit is contained in:
parent
f9bd5019fa
commit
6472e3b35e
@ -60,6 +60,9 @@ HISTORY
|
||||
|
||||
++ Bugfixes:
|
||||
|
||||
2009-02-11 Simon Goldschmidt
|
||||
* dhcp.c: fixed bug #24480 (releasing old udp_pdb and pbuf in dhcp_start)
|
||||
|
||||
2009-02-11 Simon Goldschmidt
|
||||
* opt.h, api_msg.c: added configurable default valud for netconn->recv_bufsize:
|
||||
RECV_BUFSIZE_DEFAULT (fixes bug #23726: pbuf pool exhaustion on slow recv())
|
||||
|
@ -586,6 +586,12 @@ dhcp_start(struct netif *netif)
|
||||
/* already has DHCP client attached */
|
||||
} else {
|
||||
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | 3, ("dhcp_start(): restarting DHCP configuration\n"));
|
||||
if (dhcp->pcb != NULL) {
|
||||
udp_remove(dhcp->pcb);
|
||||
}
|
||||
if (dhcp->p != NULL) {
|
||||
pbuf_free(dhcp->p);
|
||||
}
|
||||
}
|
||||
|
||||
/* clear data structure */
|
||||
@ -671,14 +677,12 @@ dhcp_inform(struct netif *netif)
|
||||
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | 2, ("dhcp_inform: could not allocate DHCP request\n"));
|
||||
}
|
||||
|
||||
if (dhcp != NULL) {
|
||||
if (dhcp->pcb != NULL) {
|
||||
udp_remove(dhcp->pcb);
|
||||
}
|
||||
dhcp->pcb = NULL;
|
||||
mem_free((void *)dhcp);
|
||||
netif->dhcp = old_dhcp;
|
||||
if (dhcp->pcb != NULL) {
|
||||
udp_remove(dhcp->pcb);
|
||||
}
|
||||
dhcp->pcb = NULL;
|
||||
mem_free((void *)dhcp);
|
||||
netif->dhcp = old_dhcp;
|
||||
}
|
||||
|
||||
#if DHCP_DOES_ARP_CHECK
|
||||
|
Loading…
Reference in New Issue
Block a user