mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-19 09:42:11 +03:00
* Fixed memory leak when calling Ethernet.begin() multiple times
* Ensure the UDP socket is closed before trying to open it
This commit is contained in:
committed by
Cristian Maglie
parent
6dbc2bfc57
commit
cce70d269c
@ -10,7 +10,8 @@ uint16_t EthernetClass::_server_port[MAX_SOCK_NUM] = {
|
||||
|
||||
int EthernetClass::begin(uint8_t *mac_address)
|
||||
{
|
||||
_dhcp = new DhcpClass();
|
||||
static DhcpClass s_dhcp;
|
||||
_dhcp = &s_dhcp;
|
||||
|
||||
|
||||
// Initialise the basic info
|
||||
|
Reference in New Issue
Block a user