mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-17 01:04:40 +08:00
Fixing some invalid reads when removing multiple adapters.
This commit is contained in:
parent
02dacdc326
commit
ad0f427712
@ -847,15 +847,16 @@ static void path_unregister(void *data)
|
||||
struct network_server *ns = data;
|
||||
struct network_adapter *na = ns->na;
|
||||
|
||||
na->servers = g_slist_remove(na->servers, ns);
|
||||
server_free(ns);
|
||||
|
||||
info("Unregistered interface %s on path %s",
|
||||
ns->iface, na->path);
|
||||
|
||||
na->servers = g_slist_remove(na->servers, ns);
|
||||
server_free(ns);
|
||||
|
||||
if (na->servers)
|
||||
return;
|
||||
|
||||
adapters = g_slist_remove(adapters, na);
|
||||
adapter_free(na);
|
||||
}
|
||||
|
||||
|
@ -1009,6 +1009,8 @@ static void manager_path_unregister(void *data)
|
||||
|
||||
if (adapter->conn)
|
||||
dbus_connection_unref(adapter->conn);
|
||||
|
||||
adapters = g_slist_remove(adapters, adapter);
|
||||
g_slist_free(adapter->proxies);
|
||||
g_free(adapter->path);
|
||||
g_free(adapter);
|
||||
|
Loading…
Reference in New Issue
Block a user