From b44c37482c6d944e54765318e38f63d92f36c09b Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 14 May 2015 14:08:19 +0200 Subject: [PATCH] Sentinel: fix access to NULL link->cc in releaseInstanceLink() --- src/sentinel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sentinel.c b/src/sentinel.c index b63781d2d..cd7f23229 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -968,7 +968,7 @@ instanceLink *releaseInstanceLink(instanceLink *link, sentinelRedisInstance *ri) redisAssert(link->refcount > 0); link->refcount--; if (link->refcount != 0) { - if (ri) { + if (ri && ri->link->cc) { /* This instance may have pending callbacks in the hiredis async * context, having as 'privdata' the instance that we are going to * free. Let's rewrite the callback list, directly exploiting