From 710ac000242ebd066a3c2eb5fba486e9584b8641 Mon Sep 17 00:00:00 2001 From: likewise Date: Tue, 15 Apr 2003 12:37:06 +0000 Subject: [PATCH] dhcp_inform() did not set and unset netif->dhcp. always generated assert failure. --- src/core/dhcp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/dhcp.c b/src/core/dhcp.c index 120b1784..47d4ef98 100644 --- a/src/core/dhcp.c +++ b/src/core/dhcp.c @@ -537,6 +537,7 @@ void dhcp_inform(struct netif *netif) DEBUGF(DHCP_DEBUG | DBG_TRACE | 2, ("dhcp_inform(): could not allocate dhcp\n")); return; } + netif->dhcp = dhcp; memset(dhcp, 0, sizeof(struct dhcp)); DEBUGF(DHCP_DEBUG | DBG_TRACE, ("dhcp_inform(): allocated dhcp\n")); @@ -577,6 +578,7 @@ void dhcp_inform(struct netif *netif) if (dhcp->pcb != NULL) udp_remove(dhcp->pcb); dhcp->pcb = NULL; mem_free((void *)dhcp); + netif->dhcp = NULL; } }