msi: Fix memory leaks and bad frees.

This commit is contained in:
Mike McCormack 2006-10-10 15:20:39 +09:00 committed by Alexandre Julliard
parent 5b160a429c
commit 73c7bcb6e5
3 changed files with 6 additions and 2 deletions

View File

@ -398,7 +398,7 @@ static UINT ACTION_AppSearchReg(MSIPACKAGE *package, LPWSTR *appValue,
appValue);
break;
case msidbLocatorTypeFileName:
*appValue = (LPWSTR)value;
*appValue = strdupW((LPCWSTR)value);
break;
case msidbLocatorTypeRawValue:
ACTION_ConvertRegValue(regType, value, sz, appValue);
@ -996,7 +996,7 @@ UINT ACTION_AppSearch(MSIPACKAGE *package)
while (!rc)
{
MSISIGNATURE sig;
LPWSTR value;
LPWSTR value = NULL;
rc = MSI_ViewFetch(view,&row);
if (rc != ERROR_SUCCESS)

View File

@ -167,7 +167,10 @@ UINT ACTION_CustomAction(MSIPACKAGE *package,LPCWSTR action, BOOL execute)
row = MSI_QueryGetRecord( package->db, ExecSeqQuery, action );
if (!row)
{
msi_free(action_copy);
return ERROR_CALL_NOT_IMPLEMENTED;
}
type = MSI_RecordGetInteger(row,2);

View File

@ -668,6 +668,7 @@ done:
msi_free(data);
msi_free(columns);
msi_free(types);
msi_free(labels);
for (i = 0; i < num_records; i++)
msi_free(records[i]);