msi: Release summary information on error in msi_parse_patch_summary.
authorHans Leidekker <hans@codeweavers.com>
Tue, 13 Apr 2010 09:15:55 +0000 (11:15 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 13 Apr 2010 09:48:25 +0000 (11:48 +0200)
dlls/msi/action.c

index 3322371dde9b914c0e268175740f2e8209d9b94f..5043426564b44f643c224c0905e5a103ed160f26 100644 (file)
@@ -501,16 +501,23 @@ static UINT msi_parse_patch_summary( MSIPACKAGE *package, MSIDATABASE *patch_db
     if (msi_check_patch_applicable( package, si ) != ERROR_SUCCESS)
     {
         TRACE("Patch not applicable\n");
+        msiobj_release( &si->hdr );
         return ERROR_SUCCESS;
     }
 
     package->patch = msi_alloc(sizeof(MSIPATCHINFO));
     if (!package->patch)
+    {
+        msiobj_release( &si->hdr );
         return ERROR_OUTOFMEMORY;
+    }
 
     package->patch->patchcode = msi_suminfo_dup_string(si, PID_REVNUMBER);
     if (!package->patch->patchcode)
+    {
+        msiobj_release( &si->hdr );
         return ERROR_OUTOFMEMORY;
+    }
 
     /* enumerate the substorage */
     str = msi_suminfo_dup_string( si, PID_LASTAUTHOR );