From 09cbbaaf7ca3cce3f65fd45db882c3aa3f5c6efd Mon Sep 17 00:00:00 2001 From: Ondrej Kosta Date: Wed, 5 Jun 2024 10:48:43 +0200 Subject: [PATCH] fix(esp_eth): Fixed another memory leak ESP MAC --- components/esp_eth/src/mac/esp_eth_mac_esp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_eth/src/mac/esp_eth_mac_esp.c b/components/esp_eth/src/mac/esp_eth_mac_esp.c index 061b8988d4..2ceb2d15b8 100644 --- a/components/esp_eth/src/mac/esp_eth_mac_esp.c +++ b/components/esp_eth/src/mac/esp_eth_mac_esp.c @@ -659,7 +659,7 @@ esp_eth_mac_t *esp_eth_mac_new_esp32(const eth_esp32_emac_config_t *esp32_config } ret_code = emac_esp_alloc_driver_obj(config, &emac); - ESP_RETURN_ON_FALSE(ret_code == ESP_OK, NULL, TAG, "alloc driver object failed"); + ESP_GOTO_ON_FALSE(ret_code == ESP_OK, NULL, err, TAG, "alloc driver object failed"); // enable bus clock for the EMAC module, and reset the registers into default state // this must be called before HAL layer initialization