for (iter = dbus_signal_list; iter; iter = g_list_next(iter)) {
signal = (struct d_bus_signal *)iter->data;
g_dbus_connection_signal_unsubscribe(conn, signal->subscription_id);
+ dbus_signal_list = g_list_remove(dbus_signal_list, signal);
free(signal);
- dbus_signal_list = g_list_remove(dbus_signal_list, iter);
}
/* Remove D-Bus method list */
method_handle = (struct d_bus_method_handle *)iter->data;
g_dbus_connection_unregister_object(conn, method_handle->subscription_id);
g_dbus_node_info_unref(method_handle->node_info);
+ dbus_method_handle_list = g_list_remove(dbus_method_handle_list, method_handle);
free(method_handle);
- dbus_method_handle_list = g_list_remove(dbus_method_handle_list, iter);
}
g_object_unref(conn);
gslist_for_each_item(iter, reverse_list) {
notifier = (struct resourced_notifier *)iter->data;
- resourced_notifier_list = g_slist_remove(resourced_notifier_list, iter);
+ resourced_notifier_list = g_slist_remove(resourced_notifier_list, notifier);
free(notifier);
}
return RESOURCED_ERROR_NONE;