From 1bd3047a939e561adfb3c7dd2e17c4cc7a4e4e6f Mon Sep 17 00:00:00 2001 From: Steve Grubb Date: Fri, 31 Jan 2025 00:58:55 -0500 Subject: [PATCH] common: Add missing va_end (#11529) The va_copy man page states that va_end must be called to revert whatever the copy did. For some implementaions, not calling va_end has no consequences. For others it could leak memory. --- common/log.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/log.cpp b/common/log.cpp index 04c7c0ed1..0b8994ae1 100644 --- a/common/log.cpp +++ b/common/log.cpp @@ -206,6 +206,7 @@ public: vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args_copy); } #endif + va_end(args_copy); } entry.level = level;