diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2011-12-15 10:47:41 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-12-15 10:47:41 -0800 |
commit | 89dc4795d95247b36a4dd85cbcd11ca52371c57c (patch) | |
tree | a283a88884af791d8e294b4d658b503d4732ec07 | |
parent | 46b993449264a2332427a165b4c77e400a053178 (diff) | |
download | syslinux-89dc4795d95247b36a4dd85cbcd11ca52371c57c.tar.gz |
Revert "core: remove redundant zalloc() definition"
This reverts commit 46b993449264a2332427a165b4c77e400a053178.
Build failure was due to a non-clean tree.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r-- | core/mem/malloc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/mem/malloc.c b/core/mem/malloc.c index fa3c395d..d27fc270 100644 --- a/core/mem/malloc.c +++ b/core/mem/malloc.c @@ -201,3 +201,14 @@ void *realloc(void *ptr, size_t size) } } } + +void *zalloc(size_t size) +{ + void *ptr; + + ptr = malloc(size); + if (ptr) + memset(ptr, 0, size); + + return ptr; +} |