From 813afba000d4dcfe5753840c9e17a5c0d7951a85 Mon Sep 17 00:00:00 2001 From: John Pye Date: Mon, 18 Dec 2023 10:54:27 +1100 Subject: [PATCH] closing with va_end. --- ascend/compiler/statio.c | 1 + ascend/general/panic.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ascend/compiler/statio.c b/ascend/compiler/statio.c index c1cf37b7c..32d4e67e8 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 ac7eb5af8..e83aba998 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); } /**