diff options
-rw-r--r-- | src/libstat/backends/redis_backend.c | 8 | ||||
-rw-r--r-- | src/libutil/upstream.c | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c index d5df2234e..e869f69ae 100644 --- a/src/libstat/backends/redis_backend.c +++ b/src/libstat/backends/redis_backend.c @@ -602,6 +602,10 @@ rspamd_redis_stat_keys (redisAsyncContext *c, gpointer r, gpointer priv) "users", 0, false); rspamd_upstream_ok (cbdata->selected); + + if (cbdata->inflight == 0) { + rspamd_redis_async_cbdata_cleanup (cbdata); + } } else { if (c->errstr) { @@ -613,10 +617,6 @@ rspamd_redis_stat_keys (redisAsyncContext *c, gpointer r, gpointer priv) rspamd_upstream_fail (cbdata->selected); rspamd_redis_async_cbdata_cleanup (cbdata); } - - if (cbdata->inflight == 0) { - rspamd_redis_async_cbdata_cleanup (cbdata); - } } static void diff --git a/src/libutil/upstream.c b/src/libutil/upstream.c index 48ef08329..67debb017 100644 --- a/src/libutil/upstream.c +++ b/src/libutil/upstream.c @@ -507,7 +507,6 @@ rspamd_upstream_dtor (struct upstream *up) } rspamd_mutex_free (up->lock); - g_free (up->name); if (up->ctx) { g_queue_delete_link (up->ctx->upstreams, up->ctx_pos); |