Fix INFO SENTINEL memory leak (#10268)

* Fix INFO SENTINEL memory leak

Introduced in #6891

* remove the copy-paste sentence
This commit is contained in:
Binbin 2022-02-09 13:33:24 +08:00 committed by GitHub
parent 051cc3d2e6
commit beb94c901e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -4133,8 +4133,7 @@ void sentinelInfoCommand(client *c) {
sections_dict = cached_all_info_sectoins;
}
sds info = sdsempty();
info = genRedisInfoString(sections_dict, 0, 0);
sds info = genRedisInfoString(sections_dict, 0, 0);
if (sec_all || (dictFind(sections_dict, "sentinel") != NULL)) {
dictIterator *di;
dictEntry *de;

View File

@ -1,4 +1,3 @@
# Check the basic monitoring and failover capabilities.
source "../tests/includes/init-tests.tcl"
test "info command with at most one argument" {