summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libstat/backends/redis_backend.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c
index fa69341f1..883d3d00c 100644
--- a/src/libstat/backends/redis_backend.c
+++ b/src/libstat/backends/redis_backend.c
@@ -1076,6 +1076,14 @@ rspamd_redis_async_stat_fin (struct rspamd_stat_async_elt *elt, gpointer d)
rspamd_redis_async_cbdata_cleanup (redis_elt->cbdata);
redis_elt->cbdata = NULL;
}
+
+ /* Clear the static elements */
+ if (redis_elt->stat) {
+ ucl_object_unref(redis_elt->stat);
+ redis_elt->stat = NULL;
+ }
+
+ g_free (redis_elt);
}
/* Called on connection termination */