From 06f0a77629586798d137058ba8f2d44cbeadd01a Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sun, 13 Aug 2023 19:48:07 -0400 Subject: [PATCH] Use va_end() in string::fV(). --- src/string.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/string.cpp b/src/string.cpp index 2c56ad46..c64052d3 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -28,6 +28,7 @@ std::string fV(const char* format, va_list args) { // va_lists cannot be reused but we need it twice, so clone args. va_list args2; va_copy(args2, args); + DEFER({va_end(args2);}); // Compute size of required buffer int size = vsnprintf(NULL, 0, format, args); if (size < 0)