From 0c36a3575ef9f8bc274fa393ac6eb7ebf9c15401 Mon Sep 17 00:00:00 2001 From: harry Date: Thu, 4 Aug 2022 05:25:58 -0400 Subject: [PATCH] Bug fix for missing va_end on stdarg list. According to online documentation, vfprintf does not call va_end. This was caught by cppcheck. --- src/drivers/Qt/AviRecord.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/drivers/Qt/AviRecord.cpp b/src/drivers/Qt/AviRecord.cpp index f6a096a9..97652c41 100644 --- a/src/drivers/Qt/AviRecord.cpp +++ b/src/drivers/Qt/AviRecord.cpp @@ -841,6 +841,8 @@ static void log_callback( void *avcl, int level, const char *fmt, va_list vl) va_copy( vl2, vl ); vfprintf( avLogFp, fmt, vl2 ); + + va_end(vl2); } av_log_default_callback( avcl, level, fmt, vl );