From 486d759fa9460d5cfd4660ad83f9d0ec9509ba51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sun, 30 Jul 2023 21:41:41 +0200 Subject: [PATCH] spa: bluez: backend-hsphfpd: remove unnecessary NULL checks `free()` already does a NULL check; and there is no reason to have those NULL checks inline. --- spa/plugins/bluez5/backend-hsphfpd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spa/plugins/bluez5/backend-hsphfpd.c b/spa/plugins/bluez5/backend-hsphfpd.c index 1895a67b6..19ae2e41e 100644 --- a/spa/plugins/bluez5/backend-hsphfpd.c +++ b/spa/plugins/bluez5/backend-hsphfpd.c @@ -170,10 +170,8 @@ static void endpoint_free(struct hsphfpd_endpoint *endpoint) { spa_list_remove(&endpoint->link); free(endpoint->path); - if (endpoint->local_address) - free(endpoint->local_address); - if (endpoint->remote_address) - free(endpoint->remote_address); + free(endpoint->local_address); + free(endpoint->remote_address); } static bool hsphfpd_cmp_transport_path(struct spa_bt_transport *t, const void *data)