X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_format_graphite.c;h=9c7d96f1bcd5011c852320201ea901e1de0620c6;hb=01d23e3f5daf016d03f82d92a76be2fe3decdca4;hp=4f509f4a4c649e47f5fc94a66174a341ab002f4b;hpb=004074af297a219208fa9e903db8c5dcdd7e1950;p=collectd.git diff --git a/src/utils_format_graphite.c b/src/utils_format_graphite.c index 4f509f4a..9c7d96f1 100644 --- a/src/utils_format_graphite.c +++ b/src/utils_format_graphite.c @@ -180,8 +180,13 @@ int format_graphite(char *buffer, size_t buffer_size, data_set_t const *ds, int buffer_pos = 0; gauge_t *rates = NULL; - if (flags & GRAPHITE_STORE_RATES) + if (flags & GRAPHITE_STORE_RATES) { rates = uc_get_rate(ds, vl); + if (rates == NULL) { + ERROR("format_graphite: error with uc_get_rate"); + return -1; + } + } for (size_t i = 0; i < ds->ds_num; i++) { char const *ds_name = NULL;