From 00c81e9d9f6e72d3184540b4b1267dcbbfb86d4e Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 27 Jul 2007 12:18:15 +0200 Subject: [PATCH] msvcrt: Fixed errno setting in malloc, HeapAlloc doesn't set last error. --- dlls/msvcrt/heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index 0158435138c..ab6dd015d13 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -272,7 +272,7 @@ void* CDECL MSVCRT_malloc(MSVCRT_size_t size) { void *ret = HeapAlloc(GetProcessHeap(),0,size); if (!ret) - msvcrt_set_errno(GetLastError()); + msvcrt_set_errno(MSVCRT_ENOMEM); return ret; } -- 2.11.4.GIT