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;