mod = *pmod;
if (rspamd_check_module (cfg, mod)) {
- mod_ctx = g_malloc0 (sizeof (struct module_ctx));
-
if (mod->module_init_func (cfg, &mod_ctx) == 0) {
+ g_assert (mod_ctx != NULL);
g_hash_table_insert (cfg->c_modules,
(gpointer) mod->name,
mod_ctx);
rspamd_mempool_add_destructor (cfg->cfg_pool,
(rspamd_mempool_destruct_t)ucl_object_unref,
cfg->current_dynamic_conf);
+ rspamd_mempool_add_destructor (cfg->cfg_pool,
+ (rspamd_mempool_destruct_t)g_free,
+ pjb);
if (!rspamd_map_add (cfg,
cfg->dynamic_conf,
rspamd_log_close (rspamd_main->logger);
REF_RELEASE (rspamd_main->cfg);
g_hash_table_unref (rspamd_main->spairs);
+ g_hash_table_unref (rspamd_main->workers);
rspamd_mempool_delete (rspamd_main->server_pool);
if (!skip_pid) {
g_free (rspamd_main);
event_base_free (ev_base);
+ if (control_addr) {
+ rspamd_inet_address_free (control_addr);
+ }
+
return (res);
}