aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-03-09 16:59:54 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-03-09 16:59:54 +0000
commitf514841c75aae5c8dfc3a8e4fba409a70424517f (patch)
tree1f19bb071125045573bf716886f164aa95c2fd4e /contrib
parentd623ed249bfd924bbf08df446f4542d7b30218ce (diff)
downloadrspamd-f514841c75aae5c8dfc3a8e4fba409a70424517f.tar.gz
rspamd-f514841c75aae5c8dfc3a8e4fba409a70424517f.zip
[Fix] Stat_redis_backend: Fix memory leak and simplify learn path
Diffstat (limited to 'contrib')
-rw-r--r--contrib/hiredis/async.c5
1 files changed, 5 insertions, 0 deletions
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;
+ }
}
}