Commit b44c3748 authored by antirez's avatar antirez
Browse files

Sentinel: fix access to NULL link->cc in releaseInstanceLink()

parent 87b6013a
...@@ -968,7 +968,7 @@ instanceLink *releaseInstanceLink(instanceLink *link, sentinelRedisInstance *ri) ...@@ -968,7 +968,7 @@ instanceLink *releaseInstanceLink(instanceLink *link, sentinelRedisInstance *ri)
redisAssert(link->refcount > 0); redisAssert(link->refcount > 0);
link->refcount--; link->refcount--;
if (link->refcount != 0) { if (link->refcount != 0) {
if (ri) { if (ri && ri->link->cc) {
/* This instance may have pending callbacks in the hiredis async /* This instance may have pending callbacks in the hiredis async
* context, having as 'privdata' the instance that we are going to * context, having as 'privdata' the instance that we are going to
* free. Let's rewrite the callback list, directly exploiting * free. Let's rewrite the callback list, directly exploiting
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment