Merge branch 'fix/esp_netif_minor_leak' into 'master'

Fix tiny memory leak when PPP connection creation fails in esp_netif_new_ppp (GitHub PR)

Closes IDFGH-16327

See merge request espressif/esp-idf!42126
This commit is contained in:
David Čermák
2025-09-27 03:59:32 +08:00

View File

@@ -229,6 +229,7 @@ netif_related_data_t * esp_netif_new_ppp(esp_netif_t *esp_netif, const esp_netif
ESP_LOGD(TAG, "%s: PPP connection created: %p", __func__, ppp_obj->ppp);
if (!ppp_obj->ppp) {
ESP_LOGE(TAG, "%s: lwIP PPP connection cannot be created", __func__);
free(ppp_obj);
return NULL;
}