Michael Karcher : msxml3: Fix leaking the BindStatusCallback if bind_url fails.

Alexandre Julliard julliard at winehq.org
Mon Oct 13 06:39:00 CDT 2008


Module: wine
Branch: master
Commit: 352dc0fc0de8f25609b3f478ee2c980110c4e82f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=352dc0fc0de8f25609b3f478ee2c980110c4e82f

Author: Michael Karcher <wine at mkarcher.dialup.fu-berlin.de>
Date:   Sat Oct 11 23:58:43 2008 +0200

msxml3: Fix leaking the BindStatusCallback if bind_url fails.

---

 dlls/msxml3/bsc.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/msxml3/bsc.c b/dlls/msxml3/bsc.c
index 5dc9d18..bc1202a 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;
 }




More information about the wine-cvs mailing list