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

@ -80,6 +80,10 @@ HISTORY
++ Bugfixes: ++ Bugfixes:
2012-08-13: Simon Goldschmidt
* dhcp.c: fixed bug #36645: Calling dhcp_release before dhcp_start
dereferences NULL
2012-08-13: Simon Goldschmidt 2012-08-13: Simon Goldschmidt
* msg_out.c: fixed bug #36840 snmp_send_trap() NULL de-reference if traps * msg_out.c: fixed bug #36840 snmp_send_trap() NULL de-reference if traps
configured but no interfaces available configured but no interfaces available

View File

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