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);
|
row = MSI_CreateRecord(1);
|
||||||
if (!row)
|
if (!row)
|
||||||
|
{
|
||||||
|
msi_free(buffer);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
MSI_RecordSetStringW(row, 1, buffer);
|
MSI_RecordSetStringW(row, 1, buffer);
|
||||||
msi_free(buffer);
|
msi_free(buffer);
|
||||||
return row;
|
return row;
|
||||||
|
@ -2301,7 +2304,10 @@ static MSIRECORD *msi_get_property_row( MSIDATABASE *db, LPCWSTR name )
|
||||||
|
|
||||||
row = MSI_CreateRecord(1);
|
row = MSI_CreateRecord(1);
|
||||||
if (!row)
|
if (!row)
|
||||||
|
{
|
||||||
|
msi_free(buffer);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
MSI_RecordSetStringW(row, 1, buffer);
|
MSI_RecordSetStringW(row, 1, buffer);
|
||||||
msi_free(buffer);
|
msi_free(buffer);
|
||||||
return row;
|
return row;
|
||||||
|
|
Loading…
Reference in New Issue