From: Stephen Worley Date: Fri, 2 Aug 2019 15:12:33 +0000 (-0400) Subject: lib: Remove double log mutex unlock X-Git-Tag: base_7.2~91^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=00a7f422c346f8cb0a79c5b9a4dd119ca122292c;p=matthieu%2Ffrr.git lib: Remove double log mutex unlock Coverity report caught this log mutex being unlocked twice. Removing the extra one before the goto statement. Signed-off-by: Stephen Worley --- diff --git a/lib/log.c b/lib/log.c index 48ee0f6adb..8e4d2bc600 100644 --- a/lib/log.c +++ b/lib/log.c @@ -387,10 +387,8 @@ void vzlog(int priority, const char *format, va_list args) /* If it doesn't match on a filter, do nothing with the debug log */ if ((priority == LOG_DEBUG) && zlog_filter_count - && vzlog_filter(zl, &tsctl, proto_str, priority, msg)) { - pthread_mutex_unlock(&loglock); + && vzlog_filter(zl, &tsctl, proto_str, priority, msg)) goto out; - } /* call external hook */ hook_call(zebra_ext_log, priority, format, args);