mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Release DHCP structure memory when netif is down.
This commit is contained in:
parent
3a4bd7f16c
commit
ad1350f0ac
@ -369,6 +369,14 @@ netif_remove(struct netif *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);
|
||||
|
||||
/* this netif is default? */
|
||||
|
Loading…
x
Reference in New Issue
Block a user