From: Vsevolod Stakhov Date: Sun, 20 Aug 2023 18:24:53 +0000 (+0100) Subject: [Minor] Fix leak X-Git-Tag: 3.7.1~71 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fb2b4fdb843c88ae5222271d498a17dec4d4ea8b;p=rspamd.git [Minor] Fix leak --- 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 {