diff --git a/dlls/msxml3/bsc.c b/dlls/msxml3/bsc.c index 5dc9d18122f..bc1202a418a 100644 --- a/dlls/msxml3/bsc.c +++ b/dlls/msxml3/bsc.c @@ -296,6 +296,12 @@ HRESULT bind_url(LPCWSTR url, HRESULT (*onDataAvailable)(void*,char*,DWORD), voi IBindCtx_Release(pbc); } + if(FAILED(hr)) + { + IBindStatusCallback_Release((IBindStatusCallback*)&bsc->lpVtbl); + bsc = NULL; + } + *ret = bsc; return hr; }