If all ATT connection callbacks are unregistered, GAttrib reference can be dropped. --- src/device.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/device.c b/src/device.c index 1f45211..571a287 100644 --- a/src/device.c +++ b/src/device.c @@ -2603,10 +2603,18 @@ gboolean btd_device_remove_attio_callback(struct btd_device *device, guint id) g_free(attio); + if (device->attios != NULL) + return TRUE; + if (device->attioid) { g_source_remove(device->attioid); device->attioid = 0; } + if (device->attrib) { + g_attrib_unref(device->attrib); + device->attrib = NULL; + } + return TRUE; } -- 1.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html