Diff between c4f77eb5acbd8398dbf990364daf6c11c781e969 and 713518331dfe0541156c9deaa988faa66d95a1a1

Changed Files

File Additions Deletions Status
profiles/audio/control.c +6 -2 modified

Full Patch

diff --git a/profiles/audio/control.c b/profiles/audio/control.c
index 707276d..4ab1f9b 100644
--- a/profiles/audio/control.c
+++ b/profiles/audio/control.c
@@ -275,11 +275,15 @@ static void path_unregister(void *data)
 
 	avctp_remove_state_cb(control->avctp_id);
 
-	if (control->target)
+	if (control->target) {
+		btd_service_set_user_data(control->target, NULL);
 		btd_service_unref(control->target);
+	}
 
-	if (control->remote)
+	if (control->remote) {
+		btd_service_set_user_data(control->remote, NULL);
 		btd_service_unref(control->remote);
+	}
 
 	devices = g_slist_remove(devices, control);
 	g_free(control);