Skip to content

Commit

Permalink
Do not resuse va_list without reinitialization
Browse files Browse the repository at this point in the history
Fixes #206.
  • Loading branch information
gaul committed Nov 24, 2019
1 parent 0a9f03e commit 7ac2eb0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ void mbp_log(int level, const char *fmt, ...)
if (daemonize) {
vsyslog(level, fmt, args);
}
va_end(args);

va_start(args, fmt);
vprintf(fmt, args);
puts(""); // trailing newline
va_end(args);
Expand Down

0 comments on commit 7ac2eb0

Please sign in to comment.