Robert Shearman : oleaut32: Zero out parameter in LoadRegTypeLib in case of failure.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Mar 30 05:44:08 CST 2006


Module: wine
Branch: refs/heads/master
Commit: 11c83c5d5ebf8456b2dcd74ee9ea5f283efae20a
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=11c83c5d5ebf8456b2dcd74ee9ea5f283efae20a

Author: Robert Shearman <rob at codeweavers.com>
Date:   Wed Mar 29 18:41:37 2006 +0100

oleaut32: Zero out parameter in LoadRegTypeLib in case of failure.

---

 dlls/oleaut32/typelib.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index cfb17ba..61403a6 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -392,7 +392,11 @@ HRESULT WINAPI LoadRegTypeLib(
 	ITypeLib **ppTLib)
 {
     BSTR bstr=NULL;
-    HRESULT res=QueryPathOfRegTypeLib( rguid, wVerMajor, wVerMinor, lcid, &bstr);
+    HRESULT res;
+
+    *ppTLib = NULL;
+
+    res = QueryPathOfRegTypeLib( rguid, wVerMajor, wVerMinor, lcid, &bstr);
 
     if(SUCCEEDED(res))
     {




More information about the wine-cvs mailing list