Merge branch 'bugfix/tw15438_mem_leak_on_wifi_start_stop_loop' into 'master'

Release DHCP structure memory when netif is down.

See merge request !1386
pull/1128/head
Jiang Jiang Jian 2017-10-12 17:51:58 +08:00
commit 52be20343b
1 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -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? */