diff --git a/checks.c b/checks.c index 3bf0fa4a..e81a8c74 100644 --- a/checks.c +++ b/checks.c @@ -113,6 +113,7 @@ static inline void check_msg(struct check *c, const char *fmt, ...) vfprintf(stderr, fmt, ap); fprintf(stderr, "\n"); } + va_end(ap); } #define FAIL(c, ...) \ diff --git a/util.h b/util.h index ccfdf4b1..f800b601 100644 --- a/util.h +++ b/util.h @@ -34,6 +34,7 @@ static inline void __attribute__((noreturn)) die(const char *str, ...) va_start(ap, str); fprintf(stderr, "FATAL ERROR: "); vfprintf(stderr, str, ap); + va_end(ap); exit(1); }