summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2012-12-03 12:12:53 +0100
committerantirez <antirez@gmail.com>2012-12-03 12:17:56 +0100
commit984f6edf0ae894b895663df267ec60d4d940efff (patch)
tree961b95afba313e8e73391bfe5b0d9904b432b1b3
parenta2b3fff23535d41b7bce6e4fac1bb5b6f4f15355 (diff)
downloadredis-984f6edf0ae894b895663df267ec60d4d940efff.tar.gz
Memory leak fixed: release client's bpop->keys dictionary.
Refactoring performed after issue #801 resolution (see commit 2f87cf8b0162bd9d78c3a89860c0971cd71d39db) introduced a memory leak that is fixed by this commit. I simply forgot to free the new allocated dictionary in the client structure trusting the output of "make test" on OSX. However due to changes in the "leaks" utility the test was no longer testing memory leaks. This problem was also fixed. Fortunately the CI test running at ci.redis.io spotted the bug in the valgrind run. The leak never ended into a stable release.
-rw-r--r--src/networking.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/networking.c b/src/networking.c
index a352ba762..4365bc8ef 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -605,6 +605,7 @@ void freeClient(redisClient *c) {
c->querybuf = NULL;
if (c->flags & REDIS_BLOCKED)
unblockClientWaitingData(c);
+ dictRelease(c->bpop.keys);
/* UNWATCH all the keys */
unwatchAllKeys(c);