Skip to content

Commit 1bd3047

Browse files
authored
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.
1 parent a2df278 commit 1bd3047

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

common/log.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ struct common_log {
206206
vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args_copy);
207207
}
208208
#endif
209+
va_end(args_copy);
209210
}
210211

211212
entry.level = level;

0 commit comments

Comments
 (0)