write_riemann plugin: Unlock mutex before destroying it.
authorFlorian Forster <octo@collectd.org>
Fri, 17 Nov 2017 16:16:39 +0000 (17:16 +0100)
committerFlorian Forster <octo@collectd.org>
Fri, 17 Nov 2017 16:16:39 +0000 (17:16 +0100)
CID: 179227

src/write_riemann.c

index 3835a3d..00852ff 100644 (file)
@@ -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 */