From 90b047b914ba21eaac09806512077e52da647d64 Mon Sep 17 00:00:00 2001 From: WanqQixiang Date: Tue, 25 Apr 2023 20:24:20 +0800 Subject: [PATCH] ESP32: Fix route hook iterator issue --- 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) {