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:48:30 +02:00 committed by Alexandre Julliard
parent f621f4102d
commit a6ad46dc94
1 changed files with 6 additions and 0 deletions

View File

@ -2286,7 +2286,10 @@ static MSIRECORD *msi_get_property_row( MSIDATABASE *db, LPCWSTR name )
row = MSI_CreateRecord(1);
if (!row)
{
msi_free(buffer);
return NULL;
}
MSI_RecordSetStringW(row, 1, buffer);
msi_free(buffer);
return row;
@ -2301,7 +2304,10 @@ static MSIRECORD *msi_get_property_row( MSIDATABASE *db, LPCWSTR name )
row = MSI_CreateRecord(1);
if (!row)
{
msi_free(buffer);
return NULL;
}
MSI_RecordSetStringW(row, 1, buffer);
msi_free(buffer);
return row;