msvcrt: Make UCRT _beginthread[ex]() hold the DLL reference.
MSVCRT's _beginthread[ex]() doesn't exhibit the same behavior and using
ThreadExit() does leak the reference.
FreeLibraryAndExit() has to be used because the DLL may be the only user
of the given CRT.
This fixes Baldur's Gate 3 crashing shortly after launch.
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Showing
Please
register
or
sign in
to comment