aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/cfg_rcl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libserver/cfg_rcl.c')
-rw-r--r--src/libserver/cfg_rcl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c
index d17fa4b7b..e01d2de0b 100644
--- a/src/libserver/cfg_rcl.c
+++ b/src/libserver/cfg_rcl.c
@@ -2503,6 +2503,8 @@ rspamd_rcl_insert_string_list_item (gpointer *target, rspamd_mempool_t *pool,
if (is_hash) {
if (d.hv == NULL) {
d.hv = g_hash_table_new (rspamd_str_hash, rspamd_str_equal);
+ rspamd_mempool_add_destructor (pool,
+ (rspamd_mempool_destruct_t)g_hash_table_unref, d.hv);
}
val = rspamd_mempool_strdup (pool, src);
@@ -2586,7 +2588,8 @@ rspamd_rcl_parse_struct_string_list (rspamd_mempool_t *pool,
/* Add a destructor */
- if (!is_hash) {
+ if (!is_hash && *target != NULL) {
+ *target = g_list_reverse (*target);
rspamd_mempool_add_destructor (pool,
(rspamd_mempool_destruct_t) g_list_free,
*target);