From: Pavel Rochnyack Date: Thu, 23 Aug 2018 07:21:44 +0000 (+0700) Subject: redis plugin: Fix coredump when stopping Collectd with inaccessible Redis server X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=672db9f6ec912aac14c0a099a13c446f66224ea2;p=collectd.git redis plugin: Fix coredump when stopping Collectd with inaccessible Redis server --- diff --git a/src/redis.c b/src/redis.c index 41442b66..dd4deb17 100644 --- a/src/redis.c +++ b/src/redis.c @@ -97,7 +97,8 @@ static void redis_node_free(void *arg) { rq = next; } - redisFree(rn->redisContext); + if (rn->redisContext) + redisFree(rn->redisContext); sfree(rn->name); sfree(rn->host); sfree(rn->passwd);