1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-11-19 18:01:33 +03:00

Merge pull request #2169 from kanglongwei/branch1

fix: #2165 memory leak
This commit is contained in:
Ilya Shipitsin
2025-10-13 14:13:55 +02:00
committed by GitHub

View File

@ -5843,7 +5843,6 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str)
// Target is invalid // Target is invalid
HttpSendNotFound(s, h->Target); HttpSendNotFound(s, h->Target);
Free(data); Free(data);
FreeHttpHeader(h);
*error_detail_str = "POST_Target_Wrong"; *error_detail_str = "POST_Target_Wrong";
} }
else else
@ -5861,10 +5860,10 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str)
{ {
// WaterMark is incorrect // WaterMark is incorrect
HttpSendForbidden(s, h->Target, NULL); HttpSendForbidden(s, h->Target, NULL);
FreeHttpHeader(h);
*error_detail_str = "POST_WaterMark_Error"; *error_detail_str = "POST_WaterMark_Error";
} }
} }
FreeHttpHeader(h);
} }
else if (StrCmpi(h->Method, "OPTIONS") == 0) else if (StrCmpi(h->Method, "OPTIONS") == 0)
{ {
@ -5884,6 +5883,7 @@ bool ServerDownloadSignature(CONNECTION *c, char **error_detail_str)
continue; continue;
} }
} }
FreeHttpHeader(h);
} }
else if (StrCmpi(h->Method, "SSTP_DUPLEX_POST") == 0 && (ProtoEnabled(server->Proto, "SSTP") || s->IsReverseAcceptedSocket) && GetServerCapsBool(server, "b_support_sstp")) else if (StrCmpi(h->Method, "SSTP_DUPLEX_POST") == 0 && (ProtoEnabled(server->Proto, "SSTP") || s->IsReverseAcceptedSocket) && GetServerCapsBool(server, "b_support_sstp"))
{ {