From c9a1ed86b775d2812baffe1f9393698b1182bca2 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 26 Sep 2012 15:21:14 +0300 Subject: [PATCH] core: Fix sending Profile.Cancel before Profile.Release --- src/profile.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/profile.c b/src/profile.c index ba9ce6c78..b21db4ca7 100644 --- a/src/profile.c +++ b/src/profile.c @@ -437,13 +437,17 @@ void btd_profile_cleanup(void) DBG("Releasing \"%s\"", ext->name); - g_dbus_remove_watch(conn, ext->id); - remove_ext(ext); + g_slist_free_full(ext->conns, ext_io_destroy); + ext->conns = NULL; msg = dbus_message_new_method_call(ext->owner, ext->path, "org.bluez.Profile", "Release"); if (msg) g_dbus_send_message(conn, msg); + + g_dbus_remove_watch(conn, ext->id); + remove_ext(ext); + } } -- 2.11.0