Channels queue is created only on device creation. So do not destroy queue on all mdls deleted in mdl_deleted_cb, just remove all entries. --- android/health.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/health.c b/android/health.c index 3afdf9b..717e9a6 100644 --- a/android/health.c +++ b/android/health.c @@ -1088,8 +1088,8 @@ static void mcap_mdl_deleted_cb(struct mcap_mdl *mdl, void *data) /* mdl == NULL means, delete all mdls */ if (!mdl) { queue_foreach(dev->channels, notify_channel, NULL); - queue_destroy(dev->channels, free_health_channel); - dev->channels = NULL; + queue_remove_all(dev->channels, NULL, NULL, + free_health_channel); return; } -- 1.9.1 -- 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