mirror of https://mirror.osredm.com/root/redis.git
Fix some memory leaks in redis-cli (#13258)
Fix memory leak related to variable slot_nodes in the clusterManagerFixSlotsCoverage() function. --------- Co-authored-by: debing.sun <debing.sun@redis.com>
This commit is contained in:
parent
6f0ddc9d92
commit
3a08819f51
|
@ -3694,6 +3694,8 @@ static int evalMode(int argc, char **argv) {
|
|||
/* Call it */
|
||||
int eval_ldb = config.eval_ldb; /* Save it, may be reverted. */
|
||||
retval = issueCommand(argc+3-got_comma, argv2);
|
||||
for (j = 0; j < argc+3-got_comma; j++) sdsfree(argv2[j]);
|
||||
free(argv2);
|
||||
if (eval_ldb) {
|
||||
if (!config.eval_ldb) {
|
||||
/* If the debugging session ended immediately, there was an
|
||||
|
@ -6079,6 +6081,7 @@ static int clusterManagerFixSlotsCoverage(char *all_slots) {
|
|||
if (!clusterManagerCheckRedisReply(n, reply, NULL)) {
|
||||
fixed = -1;
|
||||
if (reply) freeReplyObject(reply);
|
||||
if (slot_nodes) listRelease(slot_nodes);
|
||||
goto cleanup;
|
||||
}
|
||||
assert(reply->type == REDIS_REPLY_ARRAY);
|
||||
|
|
Loading…
Reference in New Issue