mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2025-01-09 21:13:22 +08:00
manager: Fix removing adapter from list upon initialization failure
This commit is contained in:
parent
ec60f0ad0d
commit
deada67640
@ -395,6 +395,7 @@ struct btd_adapter *btd_manager_register_adapter(int id)
|
||||
adapters = g_slist_append(adapters, adapter);
|
||||
|
||||
if (!adapter_init(adapter)) {
|
||||
adapters = g_slist_remove(adapters, adapter);
|
||||
btd_adapter_unref(adapter);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user