mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Sentinel: removed useless flag var from INFO-CACHE.
This commit is contained in:
parent
7576a27d58
commit
0422321617
@ -2797,12 +2797,10 @@ void sentinelCommand(redisClient *c) {
|
||||
dictType copy_keeper = instancesDictType;
|
||||
copy_keeper.valDestructor = NULL;
|
||||
dict *masters_local = NULL;
|
||||
int needs_cleanup = 0;
|
||||
if (c->argc == 2) {
|
||||
masters_local = sentinel.masters;
|
||||
} else {
|
||||
masters_local = dictCreate(©_keeper, NULL);
|
||||
needs_cleanup = 1;
|
||||
|
||||
for (int i = 2; i < c->argc; i++) {
|
||||
sentinelRedisInstance *ri;
|
||||
@ -2841,7 +2839,7 @@ void sentinelCommand(redisClient *c) {
|
||||
dictReleaseIterator(sdi);
|
||||
}
|
||||
dictReleaseIterator(di);
|
||||
if (needs_cleanup) dictRelease(masters_local);
|
||||
if (masters_local != sentinel.masters) dictRelease(masters_local);
|
||||
} else {
|
||||
addReplyErrorFormat(c,"Unknown sentinel subcommand '%s'",
|
||||
(char*)c->argv[1]->ptr);
|
||||
|
Loading…
Reference in New Issue
Block a user