From: Andrew Bays Date: Fri, 23 Mar 2018 11:08:55 +0000 (-0400) Subject: Fix mutex lock in read_event X-Git-Tag: 5.10.0~17^2~3^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f873dffe05db4e5b058bfe8e4d3cc9ffb2c0924b;p=thirdparty%2Fcollectd.git Fix mutex lock in read_event --- diff --git a/src/procevent.c b/src/procevent.c index 7fab6552b..368e7c416 100644 --- a/src/procevent.c +++ b/src/procevent.c @@ -803,7 +803,7 @@ static int read_event() { // in the ring buffer for consumption by the main polling thread. if (proc_status != -1) { - pthread_mutex_unlock(&procevent_lock); + pthread_mutex_lock(&procevent_lock); int next = ring.head + 1; if (next >= ring.maxLen)