msi: Don't leak memory on failure.

Signed-off-by: Pierre Schweitzer <pierre@reactos.org>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Pierre Schweitzer 2017-10-21 11:46:39 +02:00 committed by Alexandre Julliard
parent 808f3158bb
commit f621f4102d
1 changed files with 5 additions and 1 deletions

View File

@ -195,7 +195,11 @@ static void ui_actioninfo(MSIPACKAGE *package, LPCWSTR action, BOOL start,
template = msi_get_error_message(package->db, start ? MSIERR_INFO_ACTIONSTART : MSIERR_INFO_ACTIONENDED);
row = MSI_CreateRecord(2);
if (!row) return;
if (!row)
{
msi_free(template);
return;
}
MSI_RecordSetStringW(row, 0, template);
MSI_RecordSetStringW(row, 1, action);
MSI_RecordSetInteger(row, 2, start ? package->LastActionResult : rc);