android/scpp: Fix not unregistering on detach

This commit is contained in:
Luiz Augusto von Dentz 2014-06-30 16:47:55 +03:00 committed by Szymon Janc
parent a41d08c376
commit fc65a8cff6

View File

@ -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;
}