diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-08-20 19:24:53 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-08-20 19:45:22 +0100 |
commit | fb2b4fdb843c88ae5222271d498a17dec4d4ea8b (patch) | |
tree | 7347ac202e14c33e493687fa33d8796808d2bb91 /src/libserver/cfg_rcl.cxx | |
parent | 4b3e8bd1d1011ebfdb31ee47d27c1f1e5d97a73a (diff) | |
download | rspamd-fb2b4fdb843c88ae5222271d498a17dec4d4ea8b.tar.gz rspamd-fb2b4fdb843c88ae5222271d498a17dec4d4ea8b.zip |
[Minor] Fix leak
Diffstat (limited to 'src/libserver/cfg_rcl.cxx')
-rw-r--r-- | src/libserver/cfg_rcl.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libserver/cfg_rcl.cxx b/src/libserver/cfg_rcl.cxx index 310d89391..a20cd572d 100644 --- a/src/libserver/cfg_rcl.cxx +++ b/src/libserver/cfg_rcl.cxx @@ -68,6 +68,13 @@ struct rspamd_rcl_section { rspamd_rcl_section_fin_t fin{}; /** called at the end of section parsing */ gpointer fin_ud{}; ucl_object_t *doc_ref{}; /**< reference to the section's documentation */ + + virtual ~rspamd_rcl_section() + { + if (doc_ref) { + ucl_object_unref(doc_ref); + } + } }; struct rspamd_worker_param_parser { |