From 6a47dc9275415488eac11987d55fe011610ff625 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Mon, 11 May 2020 21:37:00 +0200 Subject: [PATCH] esp-netif: fix memory allocation issues found by static analyser --- components/esp_netif/esp_netif_objects.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/esp_netif/esp_netif_objects.c b/components/esp_netif/esp_netif_objects.c index 2c23126bf9..23a2c6dde7 100644 --- a/components/esp_netif/esp_netif_objects.c +++ b/components/esp_netif/esp_netif_objects.c @@ -76,6 +76,7 @@ esp_err_t esp_netif_add_to_list(esp_netif_t *netif) item->netif = netif; if ((ret = esp_netif_list_lock()) != ESP_OK) { + free(item); return ret; }