From 258ab45eef9a4f89abf21b3b00d5bc6f873c1f5d Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sat, 11 Apr 2015 07:10:11 +0200 Subject: [PATCH] Add missing lock in msg_tag() call --- cmdline/support.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmdline/support.c b/cmdline/support.c index f9550741..b2e0daf7 100644 --- a/cmdline/support.c +++ b/cmdline/support.c @@ -102,11 +102,15 @@ void msg_tag(const char* format, ...) { va_list ap; + pthread_mutex_lock(&msg_lock); + if (stdlog) { va_start(ap, format); vfprintf(stdlog, format, ap); va_end(ap); } + + pthread_mutex_unlock(&msg_lock); } void msg_status(const char* format, ...)