From a6fe6196d55fa720993bcf6b308ee5020d1a0c2c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 18 May 2026 16:58:20 +0200 Subject: [PATCH] modules: remove redundant close The close in the error path will never be called because the fd has been stolen and will be -1. Also make sure that when we free the source that we set it to NULL or else the destroy function will try to free it again. --- src/modules/module-raop/rtsp-client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/module-raop/rtsp-client.c b/src/modules/module-raop/rtsp-client.c index 179731f07..fbd9da09c 100644 --- a/src/modules/module-raop/rtsp-client.c +++ b/src/modules/module-raop/rtsp-client.c @@ -550,8 +550,7 @@ int pw_rtsp_client_connect(struct pw_rtsp_client *client, error: if (client->source) pw_loop_destroy_source(client->loop, client->source); - if (fd >= 0) - close(fd); + client->source = NULL; return res; }