Hans Leidekker : msi: Initialize a couple of variables.

Alexandre Julliard julliard at winehq.org
Thu Mar 4 11:21:41 CST 2010


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Thu Mar  4 09:17:50 2010 +0100

msi: Initialize a couple of variables.

Found by Valgrind.

---

 dlls/msi/action.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 08cf975..9b44de0 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -4285,8 +4285,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
 {
     MSIFEATURE *feature;
     UINT rc;
-    HKEY hkey;
-    HKEY userdata = NULL;
+    HKEY hkey = NULL, userdata = NULL;
 
     if (!msi_check_publish(package))
         return ERROR_SUCCESS;
@@ -4853,7 +4852,7 @@ static UINT ITERATE_PublishComponent(MSIRECORD *rec, LPVOID param)
     MSIPACKAGE *package = param;
     LPCWSTR compgroupid, component, feature, qualifier, text;
     LPWSTR advertise = NULL, output = NULL;
-    HKEY hkey;
+    HKEY hkey = NULL;
     UINT rc;
     MSICOMPONENT *comp;
     MSIFEATURE *feat;
@@ -5933,7 +5932,7 @@ static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param )
     LPWSTR data = NULL, newval = NULL, deformatted = NULL, ptr;
     DWORD flags, type, size;
     UINT res;
-    HKEY env;
+    HKEY env = NULL;
     MSICOMPONENT *comp;
     MSIRECORD *uirow;
     int action = 0;




More information about the wine-cvs mailing list