diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index ba5c825c1a3..c6c07cfbe50 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -452,9 +452,6 @@ static UINT wait_thread_handle( msi_custom_action_info *info ) else { TRACE("%s running in background\n", debugstr_w( info->action )); - - if (info->type & msidbCustomActionTypeContinue) - free_custom_action_data( info ); } return rc; @@ -529,6 +526,10 @@ static DWORD WINAPI ACTION_CallDllFunction( const LPGUID guid ) FreeLibrary(hModule); + if (info->type & msidbCustomActionTypeAsync && + info->type & msidbCustomActionTypeContinue) + free_custom_action_data( info ); + return r; }