Skip to content

Commit 20a23a2

Browse files
committed
Fix uninitialized memory.
1 parent 9c8fc44 commit 20a23a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tectonic/core-kpathutil.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ xcalloc (size_t nelem, size_t elsize)
3636
void *
3737
xmalloc (size_t size)
3838
{
39-
void *new_mem = malloc(size ? size : 1);
39+
void *new_mem = calloc(1, size ? size : 1);
4040

4141
if (new_mem == NULL)
4242
_tt_abort ("xmalloc request for %lu bytes failed", (unsigned long) size);

0 commit comments

Comments
 (0)