From 92ac94812b84cef7d9bddfffd0446721a7a6ee06 Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Sat, 30 Jul 2005 02:54:42 +0000 Subject: Finalize the merge from the trunk. There are more files to be merged, but they will be done manually. --- libc/stdlib/malloc-standard/malloc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libc/stdlib/malloc-standard/malloc.c') diff --git a/libc/stdlib/malloc-standard/malloc.c b/libc/stdlib/malloc-standard/malloc.c index 51e02a240..7025e8335 100644 --- a/libc/stdlib/malloc-standard/malloc.c +++ b/libc/stdlib/malloc-standard/malloc.c @@ -827,6 +827,10 @@ void* malloc(size_t bytes) mchunkptr bck; /* misc temp for linking */ void * sysmem; +#if !defined(__MALLOC_GLIBC_COMPAT__) + if (!bytes) return NULL; +#endif + LOCK; av = get_malloc_state(); /* -- cgit v1.2.3