From: Florian Forster Date: Thu, 11 Jun 2015 15:48:55 +0000 (+0100) Subject: write_redis plugin: Check the return value of format_values(). X-Git-Tag: collectd-5.5.1~116^2~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=7c04f775898bef164b834e036f1698f752b12f74;p=collectd.git write_redis plugin: Check the return value of format_values(). --- diff --git a/src/write_redis.c b/src/write_redis.c index 29253524..3b8addd2 100644 --- a/src/write_redis.c +++ b/src/write_redis.c @@ -69,9 +69,11 @@ static int wr_write (const data_set_t *ds, /* {{{ */ memset (value, 0, sizeof (value)); value_size = sizeof (value); value_ptr = &value[0]; - format_values(value_ptr, value_size, ds, vl, 0); + status = format_values (value_ptr, value_size, ds, vl, /* store rates = */ 0); pthread_mutex_lock (&node->lock); + if (status != 0) + return (status); if (node->conn == NULL) {