diff --git a/ascend/compiler/statio.c b/ascend/compiler/statio.c index c1cf37b7..32d4e67e 100644 --- a/ascend/compiler/statio.c +++ b/ascend/compiler/statio.c @@ -697,6 +697,7 @@ void WriteStatementError(const error_severity_t sev va_copy(args2,args); vfprintf_error_reporter(ASCERR,fmt,&args2); va_end(args); + va_end(args2); if(outputstatement){ FPRINTF(ASCERR,"\n"); WriteStatement(ASCERR,stat,4); diff --git a/ascend/general/panic.c b/ascend/general/panic.c index ac7eb5af..e83aba99 100644 --- a/ascend/general/panic.c +++ b/ascend/general/panic.c @@ -126,6 +126,9 @@ static void asc_va_panic(const int status, const char *filename, const int line ); } #endif + + va_end(args2); + va_end(args); } /**