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; }