From 6baed774d66731f988482942887451d00970c046 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 19 Jun 2022 17:32:23 +0000 Subject: fix(context): use calloc for tag, read --- src/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/context.c b/src/context.c index dabe9ab..4793166 100644 --- a/src/context.c +++ b/src/context.c @@ -33,7 +33,7 @@ void tatl_new(struct tatl_context *context) { context->_names_size = 0; context->_tests_size = 0; context->_timer = clock(); - context->_tag = malloc(1 * sizeof(char)); + context->_tag = calloc(1, sizeof(char)); context->_names = malloc(1 * sizeof(char *)); context->_tests = malloc(1 * sizeof(int (*)(void))); } -- cgit v1.2.3