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: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2554%2Fhead;p=thirdparty%2Fcollectd.git write_riemann plugin: Unlock mutex before destroying it. CID: 179227 --- diff --git a/src/write_riemann.c b/src/write_riemann.c index 3835a3d58..00852ffbf 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 */