From: Florian Forster Date: Fri, 17 Nov 2017 16:16:39 +0000 (+0100) Subject: write_riemann plugin: Unlock mutex before destroying it. X-Git-Tag: collectd-5.8.0~1^2^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4fdd7193481b638a059d6fa047542312e41ea45e;p=collectd.git write_riemann plugin: Unlock mutex before destroying it. CID: 179227 --- diff --git a/src/write_riemann.c b/src/write_riemann.c index 3835a3d5..00852ffb 100644 --- a/src/write_riemann.c +++ b/src/write_riemann.c @@ -601,6 +601,7 @@ static void wrr_free(void *p) /* {{{ */ wrr_disconnect(host); + pthread_mutex_lock(&host->lock); pthread_mutex_destroy(&host->lock); sfree(host); } /* }}} void wrr_free */