From 6545104b53a146be46b3d7be6d16dbb3b89e74a7 Mon Sep 17 00:00:00 2001 From: "F. Duncanh" Date: Mon, 17 Nov 2025 13:52:47 -0500 Subject: [PATCH] fix memory leak in raop.c --- lib/raop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/raop.c b/lib/raop.c index 7c1d1c9..e7f4fe2 100644 --- a/lib/raop.c +++ b/lib/raop.c @@ -330,7 +330,6 @@ conn_request(void *ptr, http_request_t *request, http_response_t **response) { logger_log(conn->raop->logger, LOGGER_DEBUG, "%s", header_str); bool data_is_plist = (strstr(header_str,"apple-binary-plist") != NULL); bool data_is_text = (strstr(header_str,"text/") != NULL); - free(header_str); int request_datalen; const char *request_data = http_request_get_data(request, &request_datalen); if (request_data) { @@ -364,7 +363,10 @@ conn_request(void *ptr, http_request_t *request, http_response_t **response) { } } } - + if (header_str) { + free(header_str); + } + if (client_session_id) { assert(!strcmp(client_session_id, conn->client_session_id)); }