From 06729a5ffd58dac9d0573682b190384c1710ec89 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sun, 24 Sep 2006 17:33:17 +0000 Subject: Remove bonding io channel watch when freeing related data --- hcid/dbus.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hcid/dbus.c b/hcid/dbus.c index c4d1e453..bd09d10d 100644 --- a/hcid/dbus.c +++ b/hcid/dbus.c @@ -863,6 +863,8 @@ void hcid_dbus_bonding_process_complete(bdaddr_t *local, bdaddr_t *peer, uint8_t name_listener_remove(connection, dbus_message_get_sender(pdata->bonding->rq), (name_cb_t) create_bond_req_exit, pdata); + if (pdata->bonding->io_id) + g_io_remove_watch(pdata->bonding->io_id); g_io_channel_close(pdata->bonding->io); bonding_request_free(pdata->bonding); pdata->bonding = NULL; @@ -1626,6 +1628,8 @@ void hcid_dbus_disconn_complete(bdaddr_t *local, uint8_t status, uint16_t handle name_listener_remove(connection, dbus_message_get_sender(pdata->bonding->rq), (name_cb_t) create_bond_req_exit, pdata); + if (pdata->bonding->io_id) + g_io_remove_watch(pdata->bonding->io_id); g_io_channel_close(pdata->bonding->io); bonding_request_free(pdata->bonding); pdata->bonding = NULL; -- cgit