mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
Cluster Manager: fix memory leak in clusterManagerWaitForClusterJoin
This commit is contained in:
parent
3578aabc05
commit
b013d2c4db
@ -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) {
|
|||||||
"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");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user