Fixed a possible NULL-pointer deref before checking it

This commit is contained in:
goldsimon 2010-06-12 17:05:54 +00:00
parent f7479781c1
commit 69bd5a29d9

View File

@ -1206,8 +1206,9 @@ dhcp_release(struct netif *netif)
void
dhcp_stop(struct netif *netif)
{
struct dhcp *dhcp = netif->dhcp;
struct dhcp *dhcp;
LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;);
dhcp = netif->dhcp;
/* Remove the flag that says this netif is handled by DHCP. */
netif->flags &= ~NETIF_FLAG_DHCP;