summaryrefslogtreecommitdiff
path: root/src/timeout.c
diff options
context:
space:
mode:
authorWen Hui <wen.hui.ware@gmail.com>2020-07-21 01:13:05 -0400
committerGitHub <noreply@github.com>2020-07-21 08:13:05 +0300
commit4e8f2d6881a38397bfbf0d7d161959163a5f6e88 (patch)
tree0763d8c1727c4b93a032460c4848fbd1c6742d20 /src/timeout.c
parent2fbd0271f6fc0a93b9323b6478ec1a7a4ca77614 (diff)
downloadredis-4e8f2d6881a38397bfbf0d7d161959163a5f6e88.tar.gz
Add missing calls to raxStop (#7532)
Since the dynamic allocations in raxIterator are only used for deep walks, memory leak due to missing call to raxStop can only happen for rax with key names longer than 32 bytes. Out of all the missing calls, the only ones that may lead to a leak are the rax for consumer groups and consumers, and these were only in AOFRW and rdbSave, which normally only happen in fork or at shutdown.
Diffstat (limited to 'src/timeout.c')
-rw-r--r--src/timeout.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/timeout.c b/src/timeout.c
index 7787a049f..d4c4690e5 100644
--- a/src/timeout.c
+++ b/src/timeout.c
@@ -150,6 +150,7 @@ void handleBlockedClientsTimeout(void) {
raxRemove(server.clients_timeout_table,ri.key,ri.key_len,NULL);
raxSeek(&ri,"^",NULL,0);
}
+ raxStop(&ri);
}
/* Get a timeout value from an object and store it into 'timeout'.