mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-29 13:53:35 +08:00
android/scpp: Fix not unregistering on detach
This commit is contained in:
parent
a41d08c376
commit
fc65a8cff6
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user