ucl_object_key (obj));
return FALSE;
}
+
+ return TRUE;
}
else {
/* Just a list */
EINVAL, "bad map object for %s", ucl_object_key (obj));
return FALSE;
}
+
+ return TRUE;
break;
case UCL_ARRAY:
/* List of IP addresses */
}
}
+ /* Destroy on cfg cleanup */
+ rspamd_mempool_add_destructor (cfg->cfg_pool,
+ (rspamd_mempool_destruct_t)rspamd_map_helper_destroy_radix,
+ *target);
+
return TRUE;
}
void
rspamd_inet_library_destroy (void)
{
- if (local_addrs != NULL) {
- rspamd_map_helper_destroy_radix (local_addrs);
- }
+ /* Ugly: local_addrs will actually be freed by config object */
}
gsize
msg_err_config ("invalid radix map static");
lua_pushnil (L);
ucl_object_unref (fake_obj);
+ ucl_object_unref (obj);
return 1;
}
ucl_object_unref (fake_obj);
+ ucl_object_unref (obj);
pmap = lua_newuserdata (L, sizeof (void *));
map->map = m;
m->lua_map = map;