From 2410300acb1452d9ea7724a8a71a3a9b2a5c62d0 Mon Sep 17 00:00:00 2001 From: Wang Qixiang <43193572+wqx6@users.noreply.github.com> Date: Mon, 1 May 2023 22:34:55 +0800 Subject: [PATCH] ESP32: Fix route hook iterator issue (#26249) --- src/platform/ESP32/route_hook/ESP32RouteHook.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/ESP32/route_hook/ESP32RouteHook.c b/src/platform/ESP32/route_hook/ESP32RouteHook.c index a63df118619ed3..df19adf1de13e8 100644 --- a/src/platform/ESP32/route_hook/ESP32RouteHook.c +++ b/src/platform/ESP32/route_hook/ESP32RouteHook.c @@ -163,7 +163,7 @@ esp_err_t esp_route_hook_init(esp_netif_t * netif) lwip_netif = netif_get_by_index((uint8_t) netif_idx); ESP_RETURN_ON_FALSE(lwip_netif != NULL, ESP_ERR_INVALID_ARG, TAG, "Invalid network interface"); - for (esp_route_hook_t * iter = s_hooks; iter != NULL; iter++) + for (esp_route_hook_t * iter = s_hooks; iter != NULL; iter = iter->next) { if (iter->netif == lwip_netif) {