From b8eeee5528502347492c2180c336e82acee97540 Mon Sep 17 00:00:00 2001 From: likewise Date: Tue, 20 May 2003 09:04:10 +0000 Subject: [PATCH] dhcp_recv() left dangling dhcp->p pointer in case of unexpected message. This could result in pbuf_free() assertion (ref count 0) or crashes. --- src/core/dhcp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/dhcp.c b/src/core/dhcp.c index 4a39cf08..c91b27d7 100644 --- a/src/core/dhcp.c +++ b/src/core/dhcp.c @@ -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)