diff options
author | antirez <antirez@gmail.com> | 2015-05-14 14:08:19 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-05-14 14:08:23 +0200 |
commit | b44c37482c6d944e54765318e38f63d92f36c09b (patch) | |
tree | 1a72ab1aeae5c98ed358ba62e93f2c9cd2d7a618 | |
parent | 87b6013adb750b1f5ba161202876a84ffac45d3a (diff) | |
download | redis-b44c37482c6d944e54765318e38f63d92f36c09b.tar.gz |
Sentinel: fix access to NULL link->cc in releaseInstanceLink()
-rw-r--r-- | src/sentinel.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |