Hans Leidekker : msi: Don't create a copy of deferred custom action data.
Alexandre Julliard
julliard at winehq.org
Mon Oct 29 13:52:53 CDT 2012
Module: wine
Branch: master
Commit: 2a31a3c05714eadc2c378847817a597429182ad2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2a31a3c05714eadc2c378847817a597429182ad2
Author: Hans Leidekker <hans at codeweavers.com>
Date: Mon Oct 29 12:16:10 2012 +0100
msi: Don't create a copy of deferred custom action data.
---
dlls/msi/custom.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index a3c253a..a4e6998 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -1225,23 +1225,19 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
UINT rc = ERROR_SUCCESS;
MSIRECORD *row;
UINT type;
- LPCWSTR source, target;
- LPWSTR ptr, deferred_data = NULL;
- LPWSTR deformated = NULL, action_copy = strdupW(action);
+ const WCHAR *source, *target, *ptr, *deferred_data = NULL;
+ WCHAR *deformated = NULL;
/* deferred action: [properties]Action */
- if ((ptr = strrchrW(action_copy, ']')))
+ if ((ptr = strrchrW(action, ']')))
{
- deferred_data = action_copy;
+ deferred_data = action;
action = ptr + 1;
}
row = MSI_QueryGetRecord( package->db, query, action );
if (!row)
- {
- msi_free(action_copy);
return ERROR_CALL_NOT_IMPLEMENTED;
- }
type = MSI_RecordGetInteger(row,2);
source = MSI_RecordGetString(row,3);
@@ -1361,7 +1357,6 @@ end:
package->scheduled_action_running = FALSE;
package->commit_action_running = FALSE;
package->rollback_action_running = FALSE;
- msi_free(action_copy);
msiobj_release(&row->hdr);
return rc;
}
More information about the wine-cvs
mailing list