3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-17 17:39:28 +01:00

eapol: Free eapol_sm even if callback is null

If deauthenticate callback was not provided, the state machine was not
being freed / removed.
This commit is contained in:
Andrew Zaborowski 2015-04-29 01:00:21 +02:00 committed by Denis Kenzior
parent 4a27563b5a
commit 169aa04570

View File

@ -560,10 +560,9 @@ void eapol_cancel(uint32_t ifindex)
static inline void handshake_failed(uint32_t ifindex, struct eapol_sm *sm,
uint16_t reason_code)
{
if (!deauthenticate)
return;
deauthenticate(ifindex, sm->aa, sm->spa, reason_code, sm->user_data);
if (deauthenticate)
deauthenticate(ifindex, sm->aa, sm->spa, reason_code,
sm->user_data);
l_queue_remove(state_machines, sm);
eapol_sm_free(sm);