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
1 changed files with 6 additions and 1 deletions

View File

@ -2725,7 +2725,8 @@ static void netdev_owe_complete(uint16_t status, void *user_data)
netdev->result = NETDEV_RESULT_ASSOCIATION_FAILED;
netdev->last_code = status;
netdev->expect_connect_failure = true;
return;
goto free_owe;
}
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);
eapol_register(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,