FILS: Simplify code paths

Use a shared code path for freeing the wpa_ie buffer to avoid
unnecessary complexity with a separate return for the non-FILS case.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2021-02-28 18:42:06 +02:00
parent 4a5f6e88b2
commit 900adb3c9f

View file

@ -3312,13 +3312,11 @@ static void wpas_update_fils_connect_params(struct wpa_supplicant *wpa_s)
if (!wpa_ie) if (!wpa_ie)
return; return;
if (params.auth_alg != WPA_AUTH_ALG_FILS) { if (params.auth_alg == WPA_AUTH_ALG_FILS) {
os_free(wpa_ie); wpa_s->auth_alg = params.auth_alg;
return; wpa_drv_update_connect_params(wpa_s, &params, mask);
} }
wpa_s->auth_alg = params.auth_alg;
wpa_drv_update_connect_params(wpa_s, &params, mask);
os_free(wpa_ie); os_free(wpa_ie);
} }
#endif /* CONFIG_FILS && IEEE8021X_EAPOL */ #endif /* CONFIG_FILS && IEEE8021X_EAPOL */