Commit 2a31a3c0 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Don't create a copy of deferred custom action data.

parent 929d2340
...@@ -1225,23 +1225,19 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL ...@@ -1225,23 +1225,19 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
UINT rc = ERROR_SUCCESS; UINT rc = ERROR_SUCCESS;
MSIRECORD *row; MSIRECORD *row;
UINT type; UINT type;
LPCWSTR source, target; const WCHAR *source, *target, *ptr, *deferred_data = NULL;
LPWSTR ptr, deferred_data = NULL; WCHAR *deformated = NULL;
LPWSTR deformated = NULL, action_copy = strdupW(action);
/* deferred action: [properties]Action */ /* deferred action: [properties]Action */
if ((ptr = strrchrW(action_copy, ']'))) if ((ptr = strrchrW(action, ']')))
{ {
deferred_data = action_copy; deferred_data = action;
action = ptr + 1; action = ptr + 1;
} }
row = MSI_QueryGetRecord( package->db, query, action ); row = MSI_QueryGetRecord( package->db, query, 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);
source = MSI_RecordGetString(row,3); source = MSI_RecordGetString(row,3);
...@@ -1361,7 +1357,6 @@ end: ...@@ -1361,7 +1357,6 @@ end:
package->scheduled_action_running = FALSE; package->scheduled_action_running = FALSE;
package->commit_action_running = FALSE; package->commit_action_running = FALSE;
package->rollback_action_running = FALSE; package->rollback_action_running = FALSE;
msi_free(action_copy);
msiobj_release(&row->hdr); msiobj_release(&row->hdr);
return rc; return rc;
} }
......
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