Auto-Merge pull request #2554 from octo/cid/179227
authorcollectd bot <32910397+collectd-bot@users.noreply.github.com>
Fri, 17 Nov 2017 17:20:21 +0000 (18:20 +0100)
committerGitHub <noreply@github.com>
Fri, 17 Nov 2017 17:20:21 +0000 (18:20 +0100)
Automatically merged due to "Automerge" label

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 */