From 56afc8a3d8a5019d44c9607508b75be0c61b1930 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Tue, 11 Mar 2008 22:23:13 +0000 Subject: connection ref can't be NULL when device_destroy is called --- hcid/device.c | 6 +++--- 1 file 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); } -- cgit