dhcp_recv() left dangling dhcp->p pointer in case of unexpected message.

This could result in pbuf_free() assertion (ref count 0) or crashes.
This commit is contained in:
likewise 2003-05-20 09:04:10 +00:00
parent 30d5b11628
commit b8eeee5528

View File

@ -943,6 +943,8 @@ static err_t dhcp_release(struct netif *netif)
void dhcp_stop(struct netif *netif)
{
struct dhcp *dhcp = netif->dhcp;
LWIP_ASSERT("dhcp_stop: netif != NULL", netif != NULL);
DEBUGF(DHCP_DEBUG | DBG_TRACE | 3, ("dhcp_stop()\n"));
/* netif is DHCP configured? */
if (dhcp != NULL)