[PATCH] free SID correctly

Marcus Meissner marcus at jet.franken.de
Sun Jan 20 14:11:19 CST 2008


Hi,

replaced msi_free() by LocalAlloc(),
since ConvertSidToStringSidW uses LocalAlloc().

Spotted by Christoph von Wittich <Christoph at ApiViewer.de>

Ciao, Marcus
---
 dlls/msi/registry.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c
index bf06d9d..ac89186 100644
--- a/dlls/msi/registry.c
+++ b/dlls/msi/registry.c
@@ -662,7 +662,7 @@ UINT MSIREG_OpenUserDataFeaturesKey(LPCWSTR szProduct, HKEY *key, BOOL create)
     else
         rc = RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
 
-    msi_free(usersid);
+    LocalFree(usersid);
     return rc;
 }
 
@@ -739,7 +739,7 @@ UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, HKEY *key, BOOL create
     else
         rc = RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
 
-    msi_free(usersid);
+    LocalFree(usersid);
     return rc;
 }
 
@@ -764,7 +764,7 @@ UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent)
 
     sprintfW(keypath, szUserDataComp_fmt, usersid, comp);
 
-    msi_free(usersid);
+    LocalFree(usersid);
     return RegDeleteTreeW(HKEY_LOCAL_MACHINE, keypath);
 }
 
@@ -794,7 +794,7 @@ UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, HKEY *key, BOOL create)
     else
         rc = RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
 
-    msi_free(usersid);
+    LocalFree(usersid);
     return rc;
 }
 
@@ -824,7 +824,7 @@ UINT MSIREG_OpenInstallPropertiesKey(LPCWSTR szProduct, HKEY *key, BOOL create)
     else
         rc = RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
 
-    msi_free(usersid);
+    LocalFree(usersid);
     return rc;
 }
 
@@ -849,7 +849,7 @@ UINT MSIREG_DeleteUserDataProductKey(LPCWSTR szProduct)
 
     sprintfW(keypath, szUserDataProd_fmt, usersid, squished_pc);
 
-    msi_free(usersid);
+    LocalFree(usersid);
     return RegDeleteTreeW(HKEY_LOCAL_MACHINE, keypath);
 }
 
@@ -1039,7 +1039,7 @@ UINT MSIREG_OpenLocalManagedProductKey(LPCWSTR szProductCode, HKEY *key, BOOL cr
     }
 
     sprintfW(keypath, szInstaller_LocalManagedProd_fmt, usersid, squished_pc);
-    msi_free(usersid);
+    LocalFree(usersid);
 
     if (create)
         return RegCreateKeyW(HKEY_LOCAL_MACHINE, keypath, key);
-- 
1.5.2.4



More information about the wine-patches mailing list