aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-10-29 10:24:28 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-10-29 10:24:28 +0100
commit5bf1a1a224ba338dceb638691c8dc1bf4be9a866 (patch)
treeb355ec05b11e98c60b0b91d670c20cd7298db864 /src
parent7d27657ae91f8fac7b0e00b619efab8b34b4b68f (diff)
downloadrspamd-5bf1a1a224ba338dceb638691c8dc1bf4be9a866.tar.gz
rspamd-5bf1a1a224ba338dceb638691c8dc1bf4be9a866.zip
[Minor] Fix static memory leak in redis stat
Diffstat (limited to 'src')
-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 */