From dc0e64a5811fe065ca88b5c973f4db0dd6f1355f Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 8 Dec 2015 14:38:05 +0100 Subject: [PATCH] ping plugin: Protect access to ping_thread_error. This is primarily to make Coverity happy. CID: 37976 --- src/ping.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ping.c b/src/ping.c index e1a31092..ecbbd9d0 100644 --- a/src/ping.c +++ b/src/ping.c @@ -416,8 +416,10 @@ static int stop_thread (void) /* {{{ */ status = -1; } + pthread_mutex_lock (&ping_lock); memset (&ping_thread_id, 0, sizeof (ping_thread_id)); ping_thread_error = 0; + pthread_mutex_unlock (&ping_lock); return (status); } /* }}} int stop_thread */ -- 2.11.0