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

netdev: Fix double-free

We should only call eapol_cancel if netdev_connect_free was not
triggered as a result of handshake failure.
This commit is contained in:
Denis Kenzior 2016-08-23 13:15:00 -05:00
parent 5d2c5b3b71
commit 0a6ffdf029

View File

@ -276,8 +276,10 @@ static void netdev_connect_free(struct netdev *netdev)
netdev->eapol_io = NULL;
}
netdev->eapol_active = false;
eapol_cancel(netdev->index);
if (netdev->eapol_active) {
eapol_cancel(netdev->index);
netdev->eapol_active = false;
}
netdev->connected = false;
netdev->connect_cb = NULL;