X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fwrite_graphite.c;h=7d7c0e8f668f2657e96922c439f65ef74d8783ba;hb=12d7e133cda071ab83f37f18126c4fc6159d08ee;hp=8fbb715cae8d54c51bf7c27195d815c965edb085;hpb=be126043c2be20399d7670fe194645292018bde0;p=collectd.git diff --git a/src/write_graphite.c b/src/write_graphite.c index 8fbb715c..7d7c0e8f 100644 --- a/src/write_graphite.c +++ b/src/write_graphite.c @@ -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); @@ -546,10 +547,10 @@ static int wg_config_node(oconfig_item_t *ci) { /* FIXME: Legacy configuration syntax. */ if (cb->name == NULL) snprintf(callback_name, sizeof(callback_name), "write_graphite/%s/%s/%s", - cb->node, cb->service, cb->protocol); + cb->node, cb->service, cb->protocol); else snprintf(callback_name, sizeof(callback_name), "write_graphite/%s", - cb->name); + cb->name); plugin_register_write(callback_name, wg_write, &(user_data_t){