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

device: destroy state watchlist after removed event

This commit is contained in:
Denis Kenzior 2016-09-22 15:28:56 -05:00
parent 42d26089e9
commit 2d87556b6b

View File

@ -1212,12 +1212,12 @@ static void device_free(void *user)
dbus_pending_reply(&device->connect_pending, dbus_pending_reply(&device->connect_pending,
dbus_error_aborted(device->connect_pending)); dbus_error_aborted(device->connect_pending));
watchlist_destroy(&device->state_watches);
if (device->state != DEVICE_STATE_OFF) if (device->state != DEVICE_STATE_OFF)
WATCHLIST_NOTIFY(&device_watches, device_watch_func_t, WATCHLIST_NOTIFY(&device_watches, device_watch_func_t,
device, DEVICE_EVENT_REMOVED); device, DEVICE_EVENT_REMOVED);
watchlist_destroy(&device->state_watches);
dbus = dbus_get_bus(); dbus = dbus_get_bus();
l_dbus_unregister_object(dbus, device_get_path(device)); l_dbus_unregister_object(dbus, device_get_path(device));