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.
This commit is contained in:
parent
20171ac200
commit
3fbe9db433
|
@ -887,7 +887,8 @@ void ACTION_FinishCustomActions(MSIPACKAGE* package)
|
||||||
{
|
{
|
||||||
if (info->package == 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 );
|
free_custom_action_data( info );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -895,7 +896,10 @@ void ACTION_FinishCustomActions(MSIPACKAGE* package)
|
||||||
LeaveCriticalSection( &msi_custom_action_cs );
|
LeaveCriticalSection( &msi_custom_action_cs );
|
||||||
|
|
||||||
for (i = 0; i < handle_count; i++)
|
for (i = 0; i < handle_count; i++)
|
||||||
|
{
|
||||||
msi_dialog_check_messages( wait_handles[i] );
|
msi_dialog_check_messages( wait_handles[i] );
|
||||||
|
CloseHandle( wait_handles[i] );
|
||||||
|
}
|
||||||
|
|
||||||
HeapFree( GetProcessHeap(), 0, wait_handles );
|
HeapFree( GetProcessHeap(), 0, wait_handles );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue