From 44bebaf5962f0b0a60b66ec8ab65f1d211b60b9d Mon Sep 17 00:00:00 2001 From: Alok Barsode Date: Mon, 1 Sep 2008 14:25:49 +0530 Subject: Freeing oor_devices list after device discovery. --- src/adapter.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/adapter.c') diff --git a/src/adapter.c b/src/adapter.c index 5cd925ea..bb2e131f 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -2715,6 +2715,12 @@ void adapter_set_state(struct adapter *adapter, int state) adapter->found_devices = NULL; } + if (!discov_active && adapter->oor_devices) { + g_slist_foreach(adapter->oor_devices, (GFunc) g_free, NULL); + g_slist_free(adapter->oor_devices); + adapter->oor_devices = NULL; + } + dbus_connection_emit_property_changed(connection, path, ADAPTER_INTERFACE, "Discovering", DBUS_TYPE_BOOLEAN, &discov_active); -- cgit