summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5717cb3)
raw | patch | inline | side by side (parent: 5717cb3)
author | Iain Buclaw <iain.buclaw@sociomantic.com> | |
Fri, 19 May 2017 10:55:37 +0000 (12:55 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Fri, 19 May 2017 13:13:31 +0000 (15:13 +0200) |
This prevents a wrong value being sent to graphite for DERIVE types.
See #2209
Signed-off-by: Florian Forster <octo@collectd.org>
See #2209
Signed-off-by: Florian Forster <octo@collectd.org>
src/utils_format_graphite.c | patch | blob | history |
index 2fe93959bcb632b12fc4b1ba32077b85c7b7c452..40bfff512d940402a737db0af2c8a2ae17012deb 100644 (file)
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;