diff options
author | antirez <antirez@gmail.com> | 2014-12-10 11:05:37 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-12-10 11:05:37 +0100 |
commit | 0422321617861a4a5b7b88d8767f6c3aa33189fa (patch) | |
tree | 66957517539328513f56ab8caee328665a85d03d | |
parent | 7576a27d586eb2ba63848c91eaefcccaf505160e (diff) | |
download | redis-0422321617861a4a5b7b88d8767f6c3aa33189fa.tar.gz |
Sentinel: removed useless flag var from INFO-CACHE.
-rw-r--r-- | src/sentinel.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/sentinel.c b/src/sentinel.c index 40b32dd1e..1308cd875 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -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); |