[PATCH 0/1] MR8032: winhttp: Use GlobalAlloc for the result of WinHttpDetectAutoProxyConfigUrl.
From: Brendan Shanks <bshanks(a)codeweavers.com> --- dlls/winhttp/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c index e8e286145ca..42f23b06a6b 100644 --- a/dlls/winhttp/session.c +++ b/dlls/winhttp/session.c @@ -1546,7 +1546,7 @@ static WCHAR *detect_autoproxyconfig_url_dhcp(void) if (err == ERROR_SUCCESS && param.nBytesData) { int len = MultiByteToWideChar( CP_ACP, 0, (const char *)param.Data, param.nBytesData, NULL, 0 ); - if ((ret = malloc( (len + 1) * sizeof(WCHAR) ))) + if ((ret = GlobalAlloc( 0, (len + 1) * sizeof(WCHAR) ))) { MultiByteToWideChar( CP_ACP, 0, (const char *)param.Data, param.nBytesData, ret, len ); ret[len] = 0; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/8032
This merge request was approved by Hans Leidekker. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8032
participants (3)
-
Brendan Shanks -
Brendan Shanks (@bshanks) -
Hans Leidekker (@hans)