From 7c04f775898bef164b834e036f1698f752b12f74 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 11 Jun 2015 16:48:55 +0100 Subject: [PATCH] write_redis plugin: Check the return value of format_values(). --- src/write_redis.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- 2.30.2