Skip to content

Commit 4387551

Browse files
committed
fix(eth): set glue handle to NULL
1 parent 0a5ba7e commit 4387551

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: libraries/Ethernet/src/ETH.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void ETHClass::_onEthEvent(int32_t event_id, void *event_data) {
118118
}
119119

120120
ETHClass::ETHClass(uint8_t eth_index)
121-
: _eth_handle(NULL), _eth_index(eth_index), _phy_type(ETH_PHY_MAX)
121+
: _eth_handle(NULL), _eth_index(eth_index), _phy_type(ETH_PHY_MAX), _glue_handle(NULL)
122122
#if ETH_SPI_SUPPORTS_CUSTOM
123123
,
124124
_spi(NULL)
@@ -832,6 +832,7 @@ void ETHClass::end(void) {
832832
log_e("Failed to del_netif_glue Ethernet");
833833
return;
834834
}
835+
_glue_handle = NULL;
835836
}
836837
//uninstall driver
837838
if (esp_eth_driver_uninstall(_eth_handle) != ESP_OK) {

0 commit comments

Comments
 (0)