From 63129dd3dc2eda1a41ee5935e3412be5cc246249 Mon Sep 17 00:00:00 2001 From: Alexander Sarmanow Date: Thu, 12 Feb 2026 10:51:38 +0100 Subject: [PATCH] fixup --- spa/plugins/bluez5/bluez5-dbus.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/spa/plugins/bluez5/bluez5-dbus.c b/spa/plugins/bluez5/bluez5-dbus.c index 21ab69dcf..4b06093fa 100644 --- a/spa/plugins/bluez5/bluez5-dbus.c +++ b/spa/plugins/bluez5/bluez5-dbus.c @@ -3040,6 +3040,7 @@ static int remote_endpoint_update_props(struct spa_bt_remote_endpoint *remote_en device = spa_bt_device_find(monitor, value); adapter = adapter_find(monitor, value); + if (device != NULL) { spa_log_debug(monitor->log, "remote_endpoint %p: device -> %p", remote_endpoint, device); @@ -3047,8 +3048,7 @@ static int remote_endpoint_update_props(struct spa_bt_remote_endpoint *remote_en if (remote_endpoint->device != NULL) spa_list_remove(&remote_endpoint->device_link); remote_endpoint->device = device; - if (device != NULL) - spa_list_append(&device->remote_endpoint_list, &remote_endpoint->device_link); + spa_list_append(&device->remote_endpoint_list, &remote_endpoint->device_link); } } if (adapter != NULL) { @@ -3058,8 +3058,7 @@ static int remote_endpoint_update_props(struct spa_bt_remote_endpoint *remote_en if (remote_endpoint->adapter != NULL) spa_list_remove(&remote_endpoint->adapter_link); remote_endpoint->adapter = adapter; - if (adapter != NULL) - spa_list_append(&adapter->remote_endpoint_list, &remote_endpoint->adapter_link); + spa_list_append(&adapter->remote_endpoint_list, &remote_endpoint->adapter_link); } } } else if (spa_streq(key, "Transport")) { @@ -3197,6 +3196,9 @@ static void remote_endpoint_free(struct spa_bt_remote_endpoint *remote_endpoint) if (remote_endpoint->device) spa_list_remove(&remote_endpoint->device_link); + if (remote_endpoint->adapter) + spa_list_remove(&remote_endpoint->adapter_link); + bap_features_clear(&remote_endpoint->bap_features); spa_list_remove(&remote_endpoint->link);