Merge branch 'bugfix/ppp_netif_free_v4.1' into 'release/v4.1'

esp-modem: Remove esp-netif destroy from modem network glue code (v4.1)

See merge request espressif/esp-idf!11873
This commit is contained in:
David Čermák 2021-03-31 09:36:41 +00:00
commit 9ed4215787
2 changed files with 2 additions and 2 deletions

View File

@ -129,7 +129,6 @@ drv_create_failed:
void esp_modem_netif_teardown(void *h)
{
esp_modem_netif_driver_t *driver = h;
esp_netif_destroy(driver->base.netif);
free(driver);
}

View File

@ -279,9 +279,10 @@ void app_main(void)
esp_mqtt_client_destroy(mqtt_client);
/* Exit PPP mode */
ESP_ERROR_CHECK(esp_modem_stop_ppp(dte));
/* Destroy the netif adapter withe events, which internally frees also the esp-netif instance */
/* Unregister events, destroy the netif adapter and destroy its esp-netif instance */
esp_modem_netif_clear_default_handlers(modem_netif_adapter);
esp_modem_netif_teardown(modem_netif_adapter);
esp_netif_destroy(esp_netif);
xEventGroupWaitBits(event_group, STOP_BIT, pdTRUE, pdTRUE, portMAX_DELAY);
#if CONFIG_EXAMPLE_SEND_MSG
const char *message = "Welcome to ESP32!";