write_graphite plugin: Unlock mutex before destroying it.
authorFlorian Forster <octo@collectd.org>
Mon, 20 Nov 2017 10:18:32 +0000 (11:18 +0100)
committerFlorian Forster <octo@collectd.org>
Mon, 20 Nov 2017 10:18:32 +0000 (11:18 +0100)
CID: 179225

src/write_graphite.c

index b85ab47..13adff5 100644 (file)
@@ -312,6 +312,7 @@ static void wg_callback_free(void *data) {
   sfree(cb->prefix);
   sfree(cb->postfix);
 
+  pthread_mutex_unlock(&cb->send_lock);
   pthread_mutex_destroy(&cb->send_lock);
 
   sfree(cb);