mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 21:44:38 +08:00
dhcp: Clear flags
Do not assume that mem_malloc() returns cleared memory.
This commit is contained in:
parent
41a36098b3
commit
4599f551de
@ -831,6 +831,8 @@ dhcp_start(struct netif *netif)
|
|||||||
return ERR_MEM;
|
return ERR_MEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* clear the flags, the rest is cleared below */
|
||||||
|
dhcp->flags = 0;
|
||||||
/* store this dhcp client in the netif */
|
/* store this dhcp client in the netif */
|
||||||
netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp);
|
netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp);
|
||||||
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp\n"));
|
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp\n"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user