From fc65a8cff69ed45b741eeb62857e1598c15fdca1 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 30 Jun 2014 16:47:55 +0300 Subject: [PATCH] android/scpp: Fix not unregistering on detach --- android/scpp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/scpp.c b/android/scpp.c index 81d698b54..b83168072 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; } -- 2.47.3