mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 19:54:32 +02:00
Release DHCP structure memory when netif is down.
This commit is contained in:
@@ -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? */
|
||||||
|
Reference in New Issue
Block a user