Browse Source

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

This could result in pbuf_free() assertion (ref count 0) or crashes.
STABLE-2_1_x
likewise 23 years ago
parent
commit
b8eeee5528
  1. 2
      src/core/dhcp.c

2
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)

Loading…
Cancel
Save