Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
b44c3748
Commit
b44c3748
authored
May 14, 2015
by
antirez
Browse files
Sentinel: fix access to NULL link->cc in releaseInstanceLink()
parent
87b6013a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
b44c3748
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment