Release DHCP structure memory when netif is down.
This commit is contained in:
parent
3a4bd7f16c
commit
ad1350f0ac
1 changed files with 8 additions and 0 deletions
|
@ -369,6 +369,14 @@ netif_remove(struct netif *netif)
|
||||||
netif_set_down(netif);
|
netif_set_down(netif);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LWIP_DHCP
|
||||||
|
/* netif not under DHCP control by default */
|
||||||
|
if (netif->dhcp) {
|
||||||
|
free(netif->dhcp);
|
||||||
|
netif->dhcp = NULL;
|
||||||
|
}
|
||||||
|
#endif /* LWIP_DHCP */
|
||||||
|
|
||||||
mib2_remove_ip4(netif);
|
mib2_remove_ip4(netif);
|
||||||
|
|
||||||
/* this netif is default? */
|
/* this netif is default? */
|
||||||
|
|
Loading…
Reference in a new issue