X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fwrite_graphite.c;h=7d7c0e8f668f2657e96922c439f65ef74d8783ba;hb=0d9f395599348e735e6f461e1c328293bef0d060;hp=206cdc2d9fc94f66a39fbb884541a76ee011d518;hpb=267bbc64779f9c7b32e063aac0df22be61bda6ae;p=collectd.git diff --git a/src/write_graphite.c b/src/write_graphite.c index 206cdc2d..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); @@ -545,11 +546,11 @@ static int wg_config_node(oconfig_item_t *ci) { /* FIXME: Legacy configuration syntax. */ if (cb->name == NULL) - ssnprintf(callback_name, sizeof(callback_name), "write_graphite/%s/%s/%s", - cb->node, cb->service, cb->protocol); + snprintf(callback_name, sizeof(callback_name), "write_graphite/%s/%s/%s", + cb->node, cb->service, cb->protocol); else - ssnprintf(callback_name, sizeof(callback_name), "write_graphite/%s", - cb->name); + snprintf(callback_name, sizeof(callback_name), "write_graphite/%s", + cb->name); plugin_register_write(callback_name, wg_write, &(user_data_t){