Commit e66758dd authored by Martin Storsjo's avatar Martin Storsjo Committed by Alexandre Julliard

msvcrt: Pass on the return value in _callnewh.

Also try to avoid race conditions by storing the new handler in a local variable before checking whether it's non-null. Signed-off-by: 's avatarMartin Storsjo <martin@martin.st> Signed-off-by: 's avatarPiotr Caban <piotr@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent eb5f7531
......@@ -234,9 +234,11 @@ int CDECL MSVCRT__set_new_mode(int mode)
*/
int CDECL _callnewh(MSVCRT_size_t size)
{
if(MSVCRT_new_handler)
(*MSVCRT_new_handler)(size);
return 0;
int ret = 0;
MSVCRT_new_handler_func handler = MSVCRT_new_handler;
if(handler)
ret = (*handler)(size) ? 1 : 0;
return ret;
}
/*********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment