Rob Shearman : ole32: Don' t release pUnk in OleCreate if CoCreateInstance failed.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jan 4 04:44:59 CST 2007


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

Author: Rob Shearman <rob at codeweavers.com>
Date:   Wed Jan  3 10:31:08 2007 +0000

ole32: Don't release pUnk in OleCreate if CoCreateInstance failed.

---

 dlls/ole32/ole2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c
index 249b75b..151957c 100644
--- a/dlls/ole32/ole2.c
+++ b/dlls/ole32/ole2.c
@@ -2399,7 +2399,7 @@ HRESULT WINAPI OleCreate(
         }
     }
 
-    if (FAILED(hres))
+    if (FAILED(hres) && pUnk)
     {
         IUnknown_Release(pUnk);
         pUnk = NULL;




More information about the wine-cvs mailing list