Hib Eris : msi: Release msi_custom_action_info when no longer needed.
Alexandre Julliard
julliard at winehq.org
Mon Jun 22 09:04:15 CDT 2009
Module: wine
Branch: master
Commit: e86ebd75b0eeaa882137ff0a4d46b84fe7c4c3f7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e86ebd75b0eeaa882137ff0a4d46b84fe7c4c3f7
Author: Hib Eris <hib at hiberis.nl>
Date: Sun Jun 21 19:48:11 2009 +0200
msi: Release msi_custom_action_info when no longer needed.
---
dlls/msi/custom.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index fa8f951..66751ca 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -888,7 +888,9 @@ static UINT HANDLE_CustomType1(MSIPACKAGE *package, LPCWSTR source,
info = do_msidbCustomActionTypeDll( package, type, tmp_file, target, action );
- return wait_thread_handle( info );
+ r = wait_thread_handle( info );
+ release_custom_action_data( info );
+ return r;
}
static UINT HANDLE_CustomType2(MSIPACKAGE *package, LPCWSTR source,
@@ -1167,9 +1169,7 @@ static DWORD ACTION_CallScript( const GUID *guid )
else
ERR("failed to create handle for %p\n", info->package );
- if (info->type & msidbCustomActionTypeAsync &&
- info->type & msidbCustomActionTypeContinue)
- release_custom_action_data( info );
+ release_custom_action_data( info );
return S_OK;
}
@@ -1226,13 +1226,16 @@ static msi_custom_action_info *do_msidbCustomActionTypeScript(
static UINT HANDLE_CustomType37_38(MSIPACKAGE *package, LPCWSTR source,
LPCWSTR target, const INT type, LPCWSTR action)
{
+ UINT r;
msi_custom_action_info *info;
TRACE("%s %s\n", debugstr_w(source), debugstr_w(target));
info = do_msidbCustomActionTypeScript( package, type, target, NULL, action );
- return wait_thread_handle( info );
+ r = wait_thread_handle( info );
+ release_custom_action_data( info );
+ return r;
}
static UINT HANDLE_CustomType5_6(MSIPACKAGE *package, LPCWSTR source,
@@ -1277,6 +1280,7 @@ static UINT HANDLE_CustomType5_6(MSIPACKAGE *package, LPCWSTR source,
info = do_msidbCustomActionTypeScript( package, type, bufferw, target, action );
r = wait_thread_handle( info );
+ release_custom_action_data( info );
done:
msi_free(bufferw);
More information about the wine-cvs
mailing list