From 87fb32dfb0e252f5a1fb939385e0aea428f3f074 Mon Sep 17 00:00:00 2001 From: Corwin Kuiper Date: Tue, 13 Jul 2021 22:24:19 +0100 Subject: [PATCH] initialise to zero --- mgba-test-runner/c/test-runner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mgba-test-runner/c/test-runner.c b/mgba-test-runner/c/test-runner.c index bdebaf07..6e50d425 100644 --- a/mgba-test-runner/c/test-runner.c +++ b/mgba-test-runner/c/test-runner.c @@ -19,7 +19,7 @@ struct MGBA { }; struct MGBA* new_runner(char* filename) { - struct MGBA* mgba = malloc(sizeof(struct MGBA)); + struct MGBA* mgba = calloc(1, sizeof(struct MGBA)); mgba->mlogger.log = log_output; mgba->callback.callback = NULL;