From: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- dlls/msxml3/httprequest.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c index 459466a1234..a0a08869ae4 100644 --- a/dlls/msxml3/httprequest.c +++ b/dlls/msxml3/httprequest.c @@ -684,15 +684,9 @@ static HRESULT BindStatusCallback_create(httprequest* This, BindStatusCallback * HRESULT hr; LONG size; - hr = CreateBindCtx(0, &pbc); - if (hr != S_OK) return hr; - bsc = heap_alloc(sizeof(*bsc)); if (!bsc) - { - IBindCtx_Release(pbc); return E_OUTOFMEMORY; - } bsc->IBindStatusCallback_iface.lpVtbl = &BindStatusCallbackVtbl; bsc->IHttpNegotiate_iface.lpVtbl = &BSCHttpNegotiateVtbl; @@ -795,6 +789,13 @@ static HRESULT BindStatusCallback_create(httprequest* This, BindStatusCallback * SafeArrayUnaccessData(sa); } + hr = CreateBindCtx(0, &pbc); + if (hr != S_OK) + { + IBindStatusCallback_Release(&bsc->IBindStatusCallback_iface); + return hr; + } + hr = RegisterBindStatusCallback(pbc, &bsc->IBindStatusCallback_iface, NULL, 0); if (hr == S_OK) { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4073