]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix leak
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 20 Aug 2023 18:24:53 +0000 (19:24 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 20 Aug 2023 18:45:22 +0000 (19:45 +0100)
src/libserver/cfg_rcl.cxx

index 310d89391acf1ca51c49ef64379b88950e65f155..a20cd572da57bae711defbeeb64b9d0291ad293d 100644 (file)
@@ -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 {