diff --git a/src/util.c b/src/util.c
index 73600c4..3022632 100644
--- a/src/util.c
+++ b/src/util.c
@@ -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);
Do not resuse va_list without reinitialization
Fixes #206.
7ac2eb01fc3ba2c85f8340693a679e3ecea5318b
Andrew Gaul <andrew@gaul.org> · 2019-11-24T13:51 ·
browse files at this commit
parents:
0a9f03e