fixed bug #36645: Calling dhcp_release before dhcp_start dereferences NULL

This commit is contained in:
goldsimon
2012-08-13 21:50:15 +02:00
parent b82bca7c99
commit bab8c82a35
2 changed files with 7 additions and 0 deletions

View File

@@ -1164,6 +1164,9 @@ dhcp_release(struct netif *netif)
err_t result;
u16_t msecs;
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_release()\n"));
if (dhcp == NULL) {
return ERR_ARG;
}
/* idle DHCP client */
dhcp_set_state(dhcp, DHCP_OFF);