From 0200e4f6ef2c890f465cf73900cbb1dc34e83038 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 3 Dec 2012 12:12:53 +0100 Subject: [PATCH] Memory leak fixed: release client's bpop->keys dictionary. Refactoring performed after issue #801 resolution (see commit b775d5c3e9b4184c931fe2250a08ff1c3fb3b080) 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. --- src/networking.c | 1 + 1 file changed, 1 insertion(+) 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);