From 1572dcd3fd1c48c7cdaaf89804227c7227391b62 Mon Sep 17 00:00:00 2001 From: Cary R Date: Fri, 5 Sep 2014 15:39:26 -0700 Subject: [PATCH] Add a couple missing va_end() calls --- parse_misc.cc | 1 + vpi/table_mod_parse.y | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/parse_misc.cc b/parse_misc.cc index f5a183bb7..2de0dfee1 100644 --- a/parse_misc.cc +++ b/parse_misc.cc @@ -53,6 +53,7 @@ void VLerror(const YYLTYPE&loc, const char*msg, ...) fprintf(stderr, "%s:%d: ", loc.text, loc.first_line); vfprintf(stderr, msg, ap); + va_end(ap); fprintf(stderr, "\n"); error_count += 1; diff --git a/vpi/table_mod_parse.y b/vpi/table_mod_parse.y index c1f5f6c25..1ded2cae3 100644 --- a/vpi/table_mod_parse.y +++ b/vpi/table_mod_parse.y @@ -1,7 +1,7 @@ %{ /* - * Copyright (C) 2011 Cary R. (cygcary@yahoo.com) + * Copyright (C) 2011-2014 Cary R. (cygcary@yahoo.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -231,6 +231,7 @@ void yyerror(const char *fmt, ...) fprintf(stderr, "%s:%u: TABLE ERROR: ", in_file_name, yylloc.first_line-1); vfprintf(stderr, fmt, ap); + va_end(ap); fprintf(stderr, "\n"); errors += 1; }