From 307489cd59f5a864c81798bf9d0f95bf73265f99 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 26 Dec 2025 13:33:01 -1000 Subject: [PATCH] missed one --- esphome/components/ethernet/ethernet_component.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/esphome/components/ethernet/ethernet_component.cpp b/esphome/components/ethernet/ethernet_component.cpp index 90ae342c53..c20f08ed82 100644 --- a/esphome/components/ethernet/ethernet_component.cpp +++ b/esphome/components/ethernet/ethernet_component.cpp @@ -671,11 +671,16 @@ void EthernetComponent::dump_connect_params_() { } #endif /* USE_NETWORK_IPV6 */ + // Use stack buffer for MAC address formatting to avoid heap allocation + uint8_t mac[6]; + char mac_buf[18]; + get_eth_mac_address_raw(mac); + format_mac_addr_upper(mac, mac_buf); ESP_LOGCONFIG(TAG, " MAC Address: %s\n" " Is Full Duplex: %s\n" " Link Speed: %u", - this->get_eth_mac_address_pretty().c_str(), YESNO(this->get_duplex_mode() == ETH_DUPLEX_FULL), + mac_buf, YESNO(this->get_duplex_mode() == ETH_DUPLEX_FULL), this->get_link_speed() == ETH_SPEED_100M ? 100 : 10); }