summaryrefslogtreecommitdiffstats
path: root/src/libserver/cfg_rcl.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-17 19:19:47 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-17 19:19:47 +0000
commit7d40df5184f0aa6facde77e088d0751d4c475c6a (patch)
tree8c54b8eb817da0dee480bebd66d46bd83ee73898 /src/libserver/cfg_rcl.c
parent6eec897d8c3e01159556f41b8bb938cacfc0c084 (diff)
downloadrspamd-7d40df5184f0aa6facde77e088d0751d4c475c6a.tar.gz
rspamd-7d40df5184f0aa6facde77e088d0751d4c475c6a.zip
[Fix] Various reload leak fixing
Diffstat (limited to 'src/libserver/cfg_rcl.c')
-rw-r--r--src/libserver/cfg_rcl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c
index ee54be39b..c36ad9408 100644
--- a/src/libserver/cfg_rcl.c
+++ b/src/libserver/cfg_rcl.c
@@ -1628,14 +1628,14 @@ rspamd_rcl_add_section (struct rspamd_rcl_section **top,
}
else {
parent_doc = (*top)->doc_ref;
- new->doc_ref = rspamd_rcl_add_doc_obj (parent_doc,
+ new->doc_ref = ucl_object_ref (rspamd_rcl_add_doc_obj (parent_doc,
NULL,
name,
type,
NULL,
0,
NULL,
- 0);
+ 0));
}
HASH_ADD_KEYPTR (hh, *top, new->name, strlen (new->name), new);
@@ -1658,14 +1658,14 @@ rspamd_rcl_add_section_doc (struct rspamd_rcl_section **top,
new->type = type;
new->strict_type = strict_type;
- new->doc_ref = rspamd_rcl_add_doc_obj (doc_target,
+ new->doc_ref = ucl_object_ref (rspamd_rcl_add_doc_obj (doc_target,
doc_string,
name,
type,
NULL,
0,
NULL,
- 0);
+ 0));
HASH_ADD_KEYPTR (hh, *top, new->name, strlen (new->name), new);
return new;
@@ -3715,7 +3715,7 @@ rspamd_rcl_add_doc_obj (ucl_object_t *doc_target,
ucl_object_insert_key (doc_target, doc_obj, doc_name, 0, true);
- return ucl_object_ref (doc_obj);
+ return doc_obj;
}
ucl_object_t *
@@ -3786,7 +3786,7 @@ rspamd_rcl_add_doc_by_path (struct rspamd_config *cfg,
}
}
- return rspamd_rcl_add_doc_obj ((ucl_object_t *) cur,
+ return rspamd_rcl_add_doc_obj (ucl_object_ref (cur),
doc_string,
doc_name,
type,