]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/commitdiff
fixed bug #36645: Calling dhcp_release before dhcp_start dereferences NULL
authorgoldsimon <goldsimon@gmx.de>
Mon, 13 Aug 2012 19:50:15 +0000 (21:50 +0200)
committergoldsimon <goldsimon@gmx.de>
Mon, 13 Aug 2012 19:50:15 +0000 (21:50 +0200)
CHANGELOG
src/core/dhcp.c

index ee04d033d5a227a0559f45800ff5e3a568eea60c..b3f6890ff6c5e42cd3cef2a1529363dc12868419 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -80,6 +80,10 @@ HISTORY
 
  ++ Bugfixes:
 
+  2012-08-13: Simon Goldschmidt
+  * dhcp.c: fixed bug #36645: Calling dhcp_release before dhcp_start
+    dereferences NULL
+
   2012-08-13: Simon Goldschmidt
   * msg_out.c: fixed bug #36840 snmp_send_trap() NULL de-reference if traps
     configured but no interfaces available
index 2851d712cda9794465bd30945eaef5eaf16009cc..f0f594f10baa432b3b89cbe1a227bdf23da18cb5 100644 (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);