From ab245552b174b10c1eddab35b8ca0ea7040a4d2a Mon Sep 17 00:00:00 2001 From: w00485423 Date: Fri, 10 Oct 2025 21:16:10 +0800 Subject: [PATCH] fix: #2165 memory leak --- src/Cedar/Protocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cedar/Protocol.c b/src/Cedar/Protocol.c index a0da6c70..b61abc1e 100644 --- a/src/Cedar/Protocol.c +++ b/src/Cedar/Protocol.c @@ -5843,7 +5843,6 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str) // Target is invalid HttpSendNotFound(s, h->Target); Free(data); - FreeHttpHeader(h); *error_detail_str = "POST_Target_Wrong"; } else @@ -5861,10 +5860,10 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str) { // WaterMark is incorrect HttpSendForbidden(s, h->Target, NULL); - FreeHttpHeader(h); *error_detail_str = "POST_WaterMark_Error"; } } + FreeHttpHeader(h); } else if (StrCmpi(h->Method, "OPTIONS") == 0) { @@ -5884,6 +5883,7 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str) continue; } } + FreeHttpHeader(h); } else if (StrCmpi(h->Method, "SSTP_DUPLEX_POST") == 0 && (ProtoEnabled(server->Proto, "SSTP") || s->IsReverseAcceptedSocket) && GetServerCapsBool(server, "b_support_sstp")) {