mirror of
https://github.com/espressif/esp-lwip.git
synced 2026-10-03 14:27:37 +00:00
Release DHCP structure memory when netif is down
This commit is contained in:
@@ -429,6 +429,18 @@ netif_remove(struct netif *netif)
|
||||
netif_set_down(netif);
|
||||
}
|
||||
|
||||
#if ESP_LWIP
|
||||
#if LWIP_DHCP
|
||||
/* netif not under DHCP control by default */
|
||||
struct dhcp *dhcp;
|
||||
dhcp = netif_dhcp_data(netif);
|
||||
if (dhcp) {
|
||||
free(dhcp);
|
||||
dhcp = NULL;
|
||||
}
|
||||
#endif /* LWIP_DHCP */
|
||||
#endif
|
||||
|
||||
mib2_remove_ip4(netif);
|
||||
|
||||
/* this netif is default? */
|
||||
|
||||
Reference in New Issue
Block a user