Rob Shearman : msi: Don'
t wait on closed handles in ACTION_FinishCustomActions.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Apr 4 12:32:25 CDT 2007
Module: wine
Branch: master
Commit: 3fbe9db433519a67d2378fc031ea182966ca6c5f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3fbe9db433519a67d2378fc031ea182966ca6c5f
Author: Rob Shearman <rob at codeweavers.com>
Date: Tue Apr 3 17:35:40 2007 +0100
msi: Don't wait on closed handles in ACTION_FinishCustomActions.
The handle will be closed by free_custom_action_data, so duplicate the
handle before calling it.
---
dlls/msi/custom.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index 48a0769..d1d492c 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -887,7 +887,8 @@ void ACTION_FinishCustomActions(MSIPACKAGE* package)
{
if (info->package == package )
{
- wait_handles[handle_count++] = info->handle;
+ if (DuplicateHandle(GetCurrentProcess(), info->handle, GetCurrentProcess(), &wait_handles[handle_count], SYNCHRONIZE, FALSE, 0))
+ handle_count++;
free_custom_action_data( info );
}
}
@@ -895,7 +896,10 @@ void ACTION_FinishCustomActions(MSIPACKAGE* package)
LeaveCriticalSection( &msi_custom_action_cs );
for (i = 0; i < handle_count; i++)
+ {
msi_dialog_check_messages( wait_handles[i] );
+ CloseHandle( wait_handles[i] );
+ }
HeapFree( GetProcessHeap(), 0, wait_handles );
}
More information about the wine-cvs
mailing list