summaryrefslogtreecommitdiffstats
path: root/libc/stdlib/malloc-standard/malloc.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2005-07-30 02:54:42 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2005-07-30 02:54:42 +0000
commit92ac94812b84cef7d9bddfffd0446721a7a6ee06 (patch)
treea5a2c895d613afb96fb71c9c19be9ec266db30d7 /libc/stdlib/malloc-standard/malloc.c
parentac02770c4a13eff9fef10c33ebb18d765f25a968 (diff)
downloaduClibc-alpine-92ac94812b84cef7d9bddfffd0446721a7a6ee06.tar.bz2
uClibc-alpine-92ac94812b84cef7d9bddfffd0446721a7a6ee06.tar.xz
Finalize the merge from the trunk. There are more files to be
merged, but they will be done manually.
Diffstat (limited to 'libc/stdlib/malloc-standard/malloc.c')
-rw-r--r--libc/stdlib/malloc-standard/malloc.c4
1 files changed, 4 insertions, 0 deletions
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();
/*