write_riemann plugin: Unlock mutex before destroying it.
[collectd.git] / 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 */