msi: Free rec in error exit (Coverity).

This commit is contained in:
Marcus Meissner 2015-06-11 16:57:34 +02:00 committed by Alexandre Julliard
parent 39797dcfb2
commit d0cb2519b6
1 changed files with 4 additions and 1 deletions

View File

@ -710,7 +710,10 @@ static UINT patch_add_media( MSIPACKAGE *package, IStorage *storage, MSIPATCHINF
msiobj_release( &rec->hdr );
continue;
}
if (!(media = msi_alloc( sizeof( *media )))) goto done;
if (!(media = msi_alloc( sizeof( *media )))) {
msiobj_release( &rec->hdr );
goto done;
}
media->disk_id = disk_id;
media->last_sequence = MSI_RecordGetInteger( rec, 2 );
media->prompt = msi_dup_record_field( rec, 3 );