Diff between a41d08c3763014ae886a1d51a89801c21da34273 and fc65a8cff69ed45b741eeb62857e1598c15fdca1

Changed Files

File Additions Deletions Status
android/scpp.c +5 -0 modified

Full Patch

diff --git a/android/scpp.c b/android/scpp.c
index 81d698b..b831680 100644
--- a/android/scpp.c
+++ b/android/scpp.c
@@ -270,6 +270,11 @@ void bt_scpp_detach(struct bt_scpp *scan)
 	if (!scan || !scan->attrib)
 		return;
 
+	if (scan->refresh_cb_id > 0) {
+		g_attrib_unregister(scan->attrib, scan->refresh_cb_id);
+		scan->refresh_cb_id = 0;
+	}
+
 	g_attrib_unref(scan->attrib);
 	scan->attrib = NULL;
 }