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

View File

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