From 9fb58434cbfd8619ae828921b1e36f324a5e7cc1 Mon Sep 17 00:00:00 2001 From: Markus Amsler Date: Sun, 22 Oct 2006 04:51:23 +0200 Subject: [PATCH] msvcrt: Speed up new operator. --- dlls/msvcrt/heap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index 12c1c6ebefe..0158435138c 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -49,8 +49,9 @@ void* CDECL MSVCRT_operator_new(unsigned long size) { void *retval = HeapAlloc(GetProcessHeap(), 0, size); TRACE("(%ld) returning %p\n", size, retval); + if(retval) return retval; LOCK_HEAP; - if(!retval && MSVCRT_new_handler) + if(MSVCRT_new_handler) (*MSVCRT_new_handler)(size); UNLOCK_HEAP; return retval;