aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-05-12 12:19:43 +0200
committerDavid Robillard <d@drobilla.net>2018-05-27 18:23:15 +0200
commit2ab12963fd1fb90d254028ff5766afd88a2da54e (patch)
tree1654c0e69b358cebd7abef58a621cfcfc46d0f40 /src
parent4bc530b356ed4b390816669725e684d038e48aa0 (diff)
downloadserd-2ab12963fd1fb90d254028ff5766afd88a2da54e.tar.gz
serd-2ab12963fd1fb90d254028ff5766afd88a2da54e.tar.bz2
serd-2ab12963fd1fb90d254028ff5766afd88a2da54e.zip
Zero-initialize stack memory
Diffstat (limited to 'src')
-rw-r--r--src/stack.h2
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;