dhcp_inform(): netif->dhcp pointed to unallocated memory when udp_new() failed

This commit is contained in:
goldsimon 2009-10-18 09:13:47 +00:00
parent b7d7559cc9
commit ec97fbd101

View File

@ -680,6 +680,7 @@ dhcp_inform(struct netif *netif)
if (dhcp->pcb == NULL) {
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | 2, ("dhcp_inform(): could not obtain pcb"));
mem_free((void *)dhcp);
netif->dhcp = old_dhcp;
return;
}
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_inform(): created new udp pcb\n"));