mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-03 18:40:59 +02:00
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:
@@ -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);
|
ESP_LOGD(TAG, "%s: PPP connection created: %p", __func__, ppp_obj->ppp);
|
||||||
if (!ppp_obj->ppp) {
|
if (!ppp_obj->ppp) {
|
||||||
ESP_LOGE(TAG, "%s: lwIP PPP connection cannot be created", __func__);
|
ESP_LOGE(TAG, "%s: lwIP PPP connection cannot be created", __func__);
|
||||||
|
free(ppp_obj);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user