[PATCH] msi: move free after last usage (Coverity)

Marcus Meissner meissner at suse.de
Thu Sep 6 07:26:17 CDT 2012


CID714083

Ciao, Marcus
---
 dlls/msi/table.c |    5 ++++-
 1 Datei geändert, 4 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)

diff --git a/dlls/msi/table.c b/dlls/msi/table.c
index dd25fbb..79a8923 100644
--- a/dlls/msi/table.c
+++ b/dlls/msi/table.c
@@ -2329,11 +2329,14 @@ static MSIRECORD *msi_get_transform_record( const MSITABLEVIEW *tv, const string
             r = IStorage_OpenStream( stg, encname, NULL,
                      STGM_READ | STGM_SHARE_EXCLUSIVE, 0, &stm );
             msi_free( encname );
-            if ( r != ERROR_SUCCESS )
+            if ( r != ERROR_SUCCESS ) {
+                msi_free( encname );
                 return NULL;
+            }
 
             MSI_RecordSetStream( rec, i+1, stm );
             TRACE(" field %d [%s]\n", i+1, debugstr_w(encname));
+            msi_free( encname );
         }
         else if( columns[i].type & MSITYPE_STRING )
         {
-- 
1.7.10.4




More information about the wine-patches mailing list