Skip to content

Commit

Permalink
common: Add missing va_end (ggerganov#11529)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stevegrubb authored Jan 31, 2025
1 parent a2df278 commit 1bd3047
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ struct common_log {
vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args_copy);
}
#endif
va_end(args_copy);
}

entry.level = level;
Expand Down

0 comments on commit 1bd3047

Please sign in to comment.