winhttp: Fix memory leak on error path in request_get_codepage (scan-build).

This commit is contained in:
Alex Henrie 2023-06-11 23:10:08 -06:00 committed by Alexandre Julliard
parent 0653409e06
commit 1f7c84a33a

View file

@ -5493,6 +5493,7 @@ static DWORD request_get_codepage( struct winhttp_request *request, UINT *codepa
if (!(buffer = malloc( size ))) return ERROR_OUTOFMEMORY;
if (!WinHttpQueryHeaders( request->hrequest, WINHTTP_QUERY_CONTENT_TYPE, NULL, buffer, &size, NULL ))
{
free( buffer );
return GetLastError();
}
if ((p = wcsstr( buffer, L"charset" )))