From f514841c75aae5c8dfc3a8e4fba409a70424517f Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 9 Mar 2020 16:59:54 +0000 Subject: [Fix] Stat_redis_backend: Fix memory leak and simplify learn path --- contrib/hiredis/async.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'contrib') diff --git a/contrib/hiredis/async.c b/contrib/hiredis/async.c index a508036e6..851676263 100644 --- a/contrib/hiredis/async.c +++ b/contrib/hiredis/async.c @@ -483,6 +483,11 @@ void redisProcessCallbacks(redisAsyncContext *ac) { * abort with an error, but simply ignore it because the client * doesn't know what the server will spit out over the wire. */ c->reader->fn->freeObject(reply); + /* Proceed with free'ing when redisAsyncFree() was called. */ + if (c->flags & REDIS_FREEING) { + __redisAsyncFree(ac); + return; + } } } -- cgit v1.2.3