mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-04 17:44:44 +08:00
adapter: Use g_slist_free_full for cleaning up discovery->found
This commit is contained in:
parent
8e1c008954
commit
f7fb5af2ac
@ -549,7 +549,7 @@ static void send_devices_found(struct btd_adapter *adapter)
|
||||
g_dbus_send_message(conn, signal);
|
||||
}
|
||||
|
||||
static void invalidate_rssi(gpointer a, gpointer b)
|
||||
static void invalidate_rssi(gpointer a)
|
||||
{
|
||||
struct btd_device *dev = a;
|
||||
|
||||
@ -570,8 +570,7 @@ static void discovery_cleanup(struct btd_adapter *adapter)
|
||||
|
||||
send_devices_found(adapter);
|
||||
|
||||
g_slist_foreach(discovery->found, invalidate_rssi, NULL);
|
||||
g_slist_free(discovery->found);
|
||||
g_slist_free_full(discovery->found, invalidate_rssi);
|
||||
|
||||
g_free(discovery);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user