msi: Fix a memory leak (valgrind).

Hans Leidekker hans at codeweavers.com
Thu Mar 10 05:45:41 CST 2011


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

diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 4736fce..7f71d1a 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -997,7 +997,6 @@ static UINT ITERATE_RemoveFiles(MSIRECORD *row, LPVOID param)
     UINT ret = ERROR_SUCCESS;
 
     component = MSI_RecordGetString(row, 2);
-    filename = strdupW( MSI_RecordGetString(row, 3) );
     dirprop = MSI_RecordGetString(row, 4);
     install_mode = MSI_RecordGetInteger(row, 5);
 
@@ -1026,7 +1025,7 @@ static UINT ITERATE_RemoveFiles(MSIRECORD *row, LPVOID param)
         return ERROR_OUTOFMEMORY;
 
     size = 0;
-    if (filename)
+    if ((filename = strdupW( MSI_RecordGetString(row, 3) )))
     {
         reduce_to_longfilename( filename );
         size = lstrlenW( filename );
-- 
1.7.1






More information about the wine-patches mailing list