]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: Remove double log mutex unlock
authorStephen Worley <sworley@cumulusnetworks.com>
Fri, 2 Aug 2019 15:12:33 +0000 (11:12 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Fri, 2 Aug 2019 15:15:10 +0000 (11:15 -0400)
Coverity report caught this log mutex being unlocked twice.
Removing the extra one before the goto statement.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
lib/log.c

index 48ee0f6adb0cc6c3a0414255e4f91e0a986d8e0c..8e4d2bc60014b5972c25ee8bbaa4db52a5c42f8f 100644 (file)
--- 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);