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

wiphy: Sanity check before netdev_disassociated

The lost beacon event can be received when iwd thinks netdev is
diconnected if it was connected before iwd started, and then
netdev_disassociated will segfault.
This commit is contained in:
Andrew Zaborowski 2016-04-11 17:03:48 +02:00 committed by Denis Kenzior
parent 2440d4cfd3
commit 692bfa23fe

View File

@ -241,6 +241,7 @@ static void netdev_lost_beacon(struct netdev *netdev)
dbus_pending_reply(&netdev->connect_pending, dbus_pending_reply(&netdev->connect_pending,
dbus_error_failed(netdev->connect_pending)); dbus_error_failed(netdev->connect_pending));
if (netdev->connected_network)
netdev_disassociated(netdev); netdev_disassociated(netdev);
} }