adhoc: segfault when exiting iwd after adhoc stop
adhoc_reset() destroys ssid and sta_states but leaves the pointers around, athough the adhoc_state structure is not always freed. This causes a segfault when exiting iwd after a client has done adhoc start and adhoc stop on a device since adhoc_reset() is called from adhoc_sta_free although it was previously called from adhoc_leave_cb().
This commit is contained in:
parent
d66dcc9412
commit
f5a7510a22
|
@ -131,10 +131,12 @@ static void adhoc_reset(struct adhoc_state *adhoc)
|
||||||
dbus_error_aborted(adhoc->pending));
|
dbus_error_aborted(adhoc->pending));
|
||||||
|
|
||||||
l_free(adhoc->ssid);
|
l_free(adhoc->ssid);
|
||||||
|
adhoc->ssid = NULL;
|
||||||
|
|
||||||
netdev_station_watch_remove(adhoc->netdev, adhoc->sta_watch_id);
|
netdev_station_watch_remove(adhoc->netdev, adhoc->sta_watch_id);
|
||||||
|
|
||||||
l_queue_destroy(adhoc->sta_states, adhoc_sta_free);
|
l_queue_destroy(adhoc->sta_states, adhoc_sta_free);
|
||||||
|
adhoc->sta_states = NULL;
|
||||||
|
|
||||||
adhoc->started = false;
|
adhoc->started = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue