X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fwrite_riemann.c;h=55699d5dca67f816e72629f0ea4744605b09048f;hp=6db3ef58ac88349adfd274cb1d1015e7cf9f4089;hb=a9e50e9e30ecde17e167e271060c8183bfcbf407;hpb=7f38ca96e3a54a4b02475f857c7d79c6a1257ada diff --git a/src/write_riemann.c b/src/write_riemann.c index 6db3ef58..55699d5d 100644 --- a/src/write_riemann.c +++ b/src/write_riemann.c @@ -362,7 +362,7 @@ wrr_value_to_event(struct riemann_host const *host, /* {{{ */ { char ds_index[DATA_MAX_NAME_LEN]; - snprintf(ds_index, sizeof(ds_index), "%zu", index); + snprintf(ds_index, sizeof(ds_index), "%" PRIsz, index); riemann_event_string_attribute_add(event, "ds_index", ds_index); } @@ -610,6 +610,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 */