From ec97fbd10194c24a6d0501d26a02dc687f3f8513 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sun, 18 Oct 2009 09:13:47 +0000 Subject: [PATCH] dhcp_inform(): netif->dhcp pointed to unallocated memory when udp_new() failed --- src/core/dhcp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/dhcp.c b/src/core/dhcp.c index c152b49a..28ed8c28 100644 --- a/src/core/dhcp.c +++ b/src/core/dhcp.c @@ -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"));