Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
121adc60
Commit
121adc60
authored
Jun 06, 2018
by
Artix
Committed by
artix
Feb 28, 2019
Browse files
Cluster Manager: fix memory leaks in clusterManagerGetDisconnectedLinks
parent
b013d2c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
121adc60
...
...
@@ -3889,7 +3889,7 @@ static list *clusterManagerGetDisconnectedLinks(clusterManagerNode *node) {
(
strstr
(
link_status
,
"disconnected"
)));
int
handshaking
=
(
strstr
(
flags
,
"handshake"
)
!=
NULL
);
if
(
disconnected
||
handshaking
)
{
clusterManagerLink
*
link
=
malloc
(
sizeof
(
*
link
));
clusterManagerLink
*
link
=
z
malloc
(
sizeof
(
*
link
));
link
->
node_name
=
sdsnew
(
nodename
);
link
->
node_addr
=
sdsnew
(
addr
);
link
->
connected
=
0
;
...
...
@@ -3908,6 +3908,7 @@ cleanup:
static
dict
*
clusterManagerGetLinkStatus
(
void
)
{
if
(
cluster_manager
.
nodes
==
NULL
)
return
NULL
;
dictType
dtype
=
clusterManagerDictType
;
dtype
.
keyDestructor
=
dictSdsDestructor
;
dtype
.
valDestructor
=
dictListDestructor
;
dict
*
status
=
dictCreate
(
&
dtype
,
NULL
);
listIter
li
;
...
...
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