diff options
author | David Robillard <d@drobilla.net> | 2018-05-12 12:19:43 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-05-27 18:23:15 +0200 |
commit | 2ab12963fd1fb90d254028ff5766afd88a2da54e (patch) | |
tree | 1654c0e69b358cebd7abef58a621cfcfc46d0f40 | |
parent | 4bc530b356ed4b390816669725e684d038e48aa0 (diff) | |
download | serd-2ab12963fd1fb90d254028ff5766afd88a2da54e.tar.gz serd-2ab12963fd1fb90d254028ff5766afd88a2da54e.tar.bz2 serd-2ab12963fd1fb90d254028ff5766afd88a2da54e.zip |
Zero-initialize stack memory
-rw-r--r-- | src/stack.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stack.h b/src/stack.h index d2445984..122b3b14 100644 --- a/src/stack.h +++ b/src/stack.h @@ -35,7 +35,7 @@ static inline SerdStack serd_stack_new(size_t size) { SerdStack stack; - stack.buf = (char*)malloc(size); + stack.buf = (char*)calloc(1, size); stack.buf_size = size; stack.size = SERD_STACK_BOTTOM; return stack; |