From ac5d7ba2b5fc867ae7e98c99a6fe45f8a777ecf9 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Wed, 22 Oct 2025 16:15:20 +0100 Subject: [PATCH] http-api: Fix leak on error --- src/http_api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/http_api.c b/src/http_api.c index 016ce3936..1f98e614d 100644 --- a/src/http_api.c +++ b/src/http_api.c @@ -366,6 +366,7 @@ static int check_access(struct mosquitto__listener *listener, struct MHD_Connect char *buf = "Not authorised\n"; struct MHD_Response *response = MHD_create_response_from_buffer(strlen(buf), (void *)buf, MHD_RESPMEM_MUST_COPY); MHD_queue_basic_auth_fail_response(connection, "Mosquitto API", response); + MHD_destroy_response(response); return MOSQ_ERR_AUTH; }