From 2c48227400a64c07647f1a630c99491a0804cd97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Tue, 21 Feb 2012 22:08:24 +0000 Subject: [PATCH] [CRT] - C standard for free says "if pointer is NULL, no action is taken". - MSDN for HeapFree says "if pointer is NULL, behavior is undefined". Thanks to Thomas for teaching wine guys how to read. svn path=/trunk/; revision=55797 --- reactos/lib/sdk/crt/wine/heap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/reactos/lib/sdk/crt/wine/heap.c b/reactos/lib/sdk/crt/wine/heap.c index 41817fb61e1..b72f63fe6cb 100644 --- a/reactos/lib/sdk/crt/wine/heap.c +++ b/reactos/lib/sdk/crt/wine/heap.c @@ -298,6 +298,7 @@ void* CDECL calloc(size_t size, size_t count) */ void CDECL free(void* ptr) { + if(ptr == NULL) return; HeapFree(GetProcessHeap(),0,ptr); }