msi: Fix a leak on error path (Coverity).

Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Sven Baars 2019-09-26 16:32:28 +02:00 committed by Alexandre Julliard
parent d2f3fc03cb
commit fe91ae51f1
1 changed files with 5 additions and 1 deletions

View File

@ -4033,7 +4033,11 @@ static msi_dialog *dialog_create( MSIPACKAGE *package, const WCHAR *name, msi_di
msiobj_release( &rec->hdr );
rec = MSI_CreateRecord(2);
if (!rec) return NULL;
if (!rec)
{
msi_dialog_destroy(dialog);
return NULL;
}
MSI_RecordSetStringW(rec, 1, name);
MSI_RecordSetStringW(rec, 2, szDialogCreated);
MSI_ProcessMessage(package, INSTALLMESSAGE_ACTIONSTART, rec);