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
b013d2c4
Commit
b013d2c4
authored
Jun 06, 2018
by
artix
Browse files
Cluster Manager: fix memory leak in clusterManagerWaitForClusterJoin
parent
3578aabc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
b013d2c4
...
@@ -3413,11 +3413,12 @@ static void clusterManagerWaitForClusterJoin(void) {
...
@@ -3413,11 +3413,12 @@ static void clusterManagerWaitForClusterJoin(void) {
sleep
(
1
);
sleep
(
1
);
if
(
++
counter
>
check_after
)
{
if
(
++
counter
>
check_after
)
{
dict
*
status
=
clusterManagerGetLinkStatus
();
dict
*
status
=
clusterManagerGetLinkStatus
();
dictIterator
*
iter
=
NULL
;
if
(
status
!=
NULL
&&
dictSize
(
status
)
>
0
)
{
if
(
status
!=
NULL
&&
dictSize
(
status
)
>
0
)
{
printf
(
"
\n
"
);
printf
(
"
\n
"
);
clusterManagerLogErr
(
"Warning: %d node(s) may "
clusterManagerLogErr
(
"Warning: %d node(s) may "
"be unreachable
\n
"
,
dictSize
(
status
));
"be unreachable
\n
"
,
dictSize
(
status
));
dictIterator
*
iter
=
dictGetIterator
(
status
);
iter
=
dictGetIterator
(
status
);
dictEntry
*
entry
;
dictEntry
*
entry
;
while
((
entry
=
dictNext
(
iter
))
!=
NULL
)
{
while
((
entry
=
dictNext
(
iter
))
!=
NULL
)
{
sds
nodeaddr
=
(
sds
)
dictGetKey
(
entry
);
sds
nodeaddr
=
(
sds
)
dictGetKey
(
entry
);
...
@@ -3447,11 +3448,11 @@ static void clusterManagerWaitForClusterJoin(void) {
...
@@ -3447,11 +3448,11 @@ static void clusterManagerWaitForClusterJoin(void) {
"from standard instance port.
\n
"
);
"from standard instance port.
\n
"
);
listEmpty
(
from
);
listEmpty
(
from
);
}
}
dictReleaseIterator
(
iter
);
dictRelease
(
status
);
}
}
if
(
iter
!=
NULL
)
dictReleaseIterator
(
iter
);
if
(
status
!=
NULL
)
dictRelease
(
status
);
counter
=
0
;
counter
=
0
;
}
}
}
}
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
}
...
...
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