msi: Uninitialized variable fix (Coverity)

Andrew Talbot andrew.talbot at talbotville.com
Tue Sep 9 15:54:42 CDT 2008


Fix for Coverity error CID: 762.

---
Changelog:
    msi: Uninitialized variable fix (Coverity).

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 8a8efe7..48557f0 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -3838,7 +3838,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
     MSIFEATURE *feature;
     UINT rc;
     HKEY hkey;
-    HKEY userdata;
+    HKEY userdata = NULL;
 
     if (!msi_check_publish(package))
         return ERROR_SUCCESS;
@@ -3952,7 +3952,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
 
 end:
     RegCloseKey(hkey);
-    RegCloseKey(userdata);
+    if (userdata) RegCloseKey(userdata);
     return rc;
 }
 



More information about the wine-patches mailing list