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:
parent
f621f4102d
commit
a6ad46dc94
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue