From d0cb2519b666fda68515f65662d72b39f6a1f455 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 11 Jun 2015 16:57:34 +0200 Subject: [PATCH] msi: Free rec in error exit (Coverity). --- dlls/msi/patch.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/msi/patch.c b/dlls/msi/patch.c index 545635987e0..f8f3eaf5a2e 100644 --- a/dlls/msi/patch.c +++ b/dlls/msi/patch.c @@ -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 );