summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2008-03-11 22:23:13 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2008-03-11 22:23:13 +0000
commit56afc8a3d8a5019d44c9607508b75be0c61b1930 (patch)
tree651f9af478be09e321015ad9115c86fc221173a7
parent388aa36ed4cd66347e79c600b46378b3f3846363 (diff)
connection ref can't be NULL when device_destroy is called
-rw-r--r--hcid/device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hcid/device.c b/hcid/device.c
index a098f873..49b3ab84 100644
--- a/hcid/device.c
+++ b/hcid/device.c
@@ -733,12 +733,12 @@ static void device_destroy(struct device *device)
void device_cleanup(void)
{
- g_slist_foreach(device_list, (GFunc) device_destroy, NULL);
- g_slist_free(device_list);
-
if (connection == NULL)
return;
+ g_slist_foreach(device_list, (GFunc) device_destroy, NULL);
+ g_slist_free(device_list);
+
dbus_connection_unref(connection);
}