Code

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 3835a3d58b09e04234c7b3281ed167876042dfa9..00852ffbf2c851665196252ea45f2b445d8655f0 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 */