Skip to content

Commit 7ac2eb0

Browse files
committed
Do not resuse va_list without reinitialization
Fixes #206.
1 parent 0a9f03e commit 7ac2eb0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/util.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ void mbp_log(int level, const char *fmt, ...)
1212
if (daemonize) {
1313
vsyslog(level, fmt, args);
1414
}
15+
va_end(args);
16+
17+
va_start(args, fmt);
1518
vprintf(fmt, args);
1619
puts(""); // trailing newline
1720
va_end(args);

0 commit comments

Comments
 (0)