Commit 73c7bcb6 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

msi: Fix memory leaks and bad frees.

parent 5b160a42
...@@ -398,7 +398,7 @@ static UINT ACTION_AppSearchReg(MSIPACKAGE *package, LPWSTR *appValue, ...@@ -398,7 +398,7 @@ static UINT ACTION_AppSearchReg(MSIPACKAGE *package, LPWSTR *appValue,
appValue); appValue);
break; break;
case msidbLocatorTypeFileName: case msidbLocatorTypeFileName:
*appValue = (LPWSTR)value; *appValue = strdupW((LPCWSTR)value);
break; break;
case msidbLocatorTypeRawValue: case msidbLocatorTypeRawValue:
ACTION_ConvertRegValue(regType, value, sz, appValue); ACTION_ConvertRegValue(regType, value, sz, appValue);
...@@ -996,7 +996,7 @@ UINT ACTION_AppSearch(MSIPACKAGE *package) ...@@ -996,7 +996,7 @@ UINT ACTION_AppSearch(MSIPACKAGE *package)
while (!rc) while (!rc)
{ {
MSISIGNATURE sig; MSISIGNATURE sig;
LPWSTR value; LPWSTR value = NULL;
rc = MSI_ViewFetch(view,&row); rc = MSI_ViewFetch(view,&row);
if (rc != ERROR_SUCCESS) if (rc != ERROR_SUCCESS)
......
...@@ -167,7 +167,10 @@ UINT ACTION_CustomAction(MSIPACKAGE *package,LPCWSTR action, BOOL execute) ...@@ -167,7 +167,10 @@ UINT ACTION_CustomAction(MSIPACKAGE *package,LPCWSTR action, BOOL execute)
row = MSI_QueryGetRecord( package->db, ExecSeqQuery, action ); row = MSI_QueryGetRecord( package->db, ExecSeqQuery, action );
if (!row) if (!row)
{
msi_free(action_copy);
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
}
type = MSI_RecordGetInteger(row,2); type = MSI_RecordGetInteger(row,2);
......
...@@ -668,6 +668,7 @@ done: ...@@ -668,6 +668,7 @@ done:
msi_free(data); msi_free(data);
msi_free(columns); msi_free(columns);
msi_free(types); msi_free(types);
msi_free(labels);
for (i = 0; i < num_records; i++) for (i = 0; i < num_records; i++)
msi_free(records[i]); msi_free(records[i]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment