diff --git a/src/cpu/core_dyn_x86/risc_x86.h b/src/cpu/core_dyn_x86/risc_x86.h index f0f06502..ca502d8f 100644 --- a/src/cpu/core_dyn_x86/risc_x86.h +++ b/src/cpu/core_dyn_x86/risc_x86.h @@ -769,6 +769,7 @@ static void gen_call_function(void * func,char const* ops,...) { } ops++; } + va_end(params); #if defined (MACOSX) /* align stack */ diff --git a/src/debug/debug_disasm.cpp b/src/debug/debug_disasm.cpp index 51155ed9..9b905f8a 100644 --- a/src/debug/debug_disasm.cpp +++ b/src/debug/debug_disasm.cpp @@ -490,6 +490,7 @@ static void uprintf(char const *s, ...) va_list arg_ptr; va_start (arg_ptr, s); vsprintf(ubufp, s, arg_ptr); + va_end(arg_ptr); while (*ubufp) ubufp++; } diff --git a/src/libs/zmbv/zmbv_vfw.cpp b/src/libs/zmbv/zmbv_vfw.cpp index eedb92d6..dec8dc6f 100644 --- a/src/libs/zmbv/zmbv_vfw.cpp +++ b/src/libs/zmbv/zmbv_vfw.cpp @@ -50,6 +50,7 @@ void Msg(const char fmt[], ...) { va_start(val, fmt); wvsprintf(buf, fmt, val); + va_end(val); const COORD _80x50 = {80,50}; static BOOL startup = (AllocConsole(), SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), _80x50));