From 721fe216e7d1a14542e1b4dc3e1d863dd14ff947 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 8 Jul 2021 10:29:30 +0800 Subject: [PATCH] wpa_supplicant: Fix wps_free_pins to remove all pins Current code does not correctly free all pins in wps_free_pins due to the semicolon at the end of dl_list_for_each_safe(). Fix it. Signed-off-by: Axel Lin --- components/wpa_supplicant/src/wps/wps_registrar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/wpa_supplicant/src/wps/wps_registrar.c b/components/wpa_supplicant/src/wps/wps_registrar.c index 2a13b3bbb3..3d22a5eb5c 100644 --- a/components/wpa_supplicant/src/wps/wps_registrar.c +++ b/components/wpa_supplicant/src/wps/wps_registrar.c @@ -101,8 +101,8 @@ static void wps_remove_pin(struct wps_uuid_pin *pin) static void wps_free_pins(struct dl_list *pins) { struct wps_uuid_pin *pin, *prev; - dl_list_for_each_safe(pin, prev, pins, struct wps_uuid_pin, list); - wps_remove_pin(pin); + dl_list_for_each_safe(pin, prev, pins, struct wps_uuid_pin, list) + wps_remove_pin(pin); } #endif