diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2008-03-11 22:23:13 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2008-03-11 22:23:13 +0000 |
commit | 56afc8a3d8a5019d44c9607508b75be0c61b1930 (patch) | |
tree | 651f9af478be09e321015ad9115c86fc221173a7 | |
parent | 388aa36ed4cd66347e79c600b46378b3f3846363 (diff) |
connection ref can't be NULL when device_destroy is called
-rw-r--r-- | hcid/device.c | 6 |
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); } |