3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 21:22:37 +01:00

netdev: free OWE SM once protocol has completed

The OWE SM is not needed once the OWE protocol completes. We can
free it immediately in netdev_owe_complete (unless retrying).
This commit is contained in:
James Prestwood 2019-04-22 13:16:39 -07:00 committed by Denis Kenzior
parent 5cc0148e7f
commit ea571bc6ac

View File

@ -2725,7 +2725,8 @@ static void netdev_owe_complete(uint16_t status, void *user_data)
netdev->result = NETDEV_RESULT_ASSOCIATION_FAILED; netdev->result = NETDEV_RESULT_ASSOCIATION_FAILED;
netdev->last_code = status; netdev->last_code = status;
netdev->expect_connect_failure = true; netdev->expect_connect_failure = true;
return;
goto free_owe;
} }
netdev->ignore_connect_event = true; netdev->ignore_connect_event = true;
@ -2733,6 +2734,10 @@ static void netdev_owe_complete(uint16_t status, void *user_data)
netdev->sm = eapol_sm_new(netdev->handshake); netdev->sm = eapol_sm_new(netdev->handshake);
eapol_register(netdev->sm); eapol_register(netdev->sm);
eapol_start(netdev->sm); eapol_start(netdev->sm);
free_owe:
owe_sm_free(netdev->owe);
netdev->owe = NULL;
} }
static void netdev_fils_tx_authenticate(const uint8_t *body, static void netdev_fils_tx_authenticate(const uint8_t *body,