From 66320ca8667b55b4f0f4d40920f5f284d45a6706 Mon Sep 17 00:00:00 2001 From: Olaf Bernstein Date: Sat, 1 May 2021 16:59:12 +0200 Subject: [PATCH] added missing va_end --- tokenize.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tokenize.c b/tokenize.c index 5c49c0242..8b27d8186 100644 --- a/tokenize.c +++ b/tokenize.c @@ -17,6 +17,7 @@ void error(char *fmt, ...) { va_list ap; va_start(ap, fmt); vfprintf(stderr, fmt, ap); + va_end(ap); fprintf(stderr, "\n"); exit(1); } @@ -58,6 +59,7 @@ void error_at(char *loc, char *fmt, ...) { va_list ap; va_start(ap, fmt); verror_at(current_file->name, current_file->contents, line_no, loc, fmt, ap); + va_end(ap); exit(1); } @@ -65,6 +67,7 @@ void error_tok(Token *tok, char *fmt, ...) { va_list ap; va_start(ap, fmt); verror_at(tok->file->name, tok->file->contents, tok->line_no, tok->loc, fmt, ap); + va_end(ap); exit(1); }