Explorar el Código

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.
Steve Grubb hace 11 meses
padre
commit
1bd3047a93
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      common/log.cpp

+ 1 - 0
common/log.cpp

@@ -206,6 +206,7 @@ public:
                 vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args_copy);
                 vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args_copy);
             }
             }
 #endif
 #endif
+            va_end(args_copy);
         }
         }
 
 
         entry.level = level;
         entry.level = level;