if (st->last_ips) {
rspamd_lru_hash_destroy (st->last_ips);
}
-
- g_slice_free1 (sizeof (*st), st);
}
static void
if (key->stat) {
fuzzy_key_stat_dtor (key->stat);
}
-
- g_slice_free1 (sizeof (*key), key);
}
static void
(rspamd_mempool_destruct_t)g_hash_table_unref, ctx->keys);
ctx->master_flags = g_hash_table_new (g_direct_hash, g_direct_equal);
rspamd_mempool_add_destructor (cfg->cfg_pool,
- (rspamd_mempool_destruct_t)g_hash_table_unref, ctx->master_flags);
+ (rspamd_mempool_destruct_t)g_hash_table_unref, ctx->master_flags);
ctx->errors_ips = rspamd_lru_hash_new_full (1024,
(GDestroyNotify) rspamd_inet_address_destroy, g_free,
rspamd_inet_address_hash, rspamd_inet_address_equal);
rspamd_keypair_cache_destroy (ctx->keypair_cache);
}
- g_hash_table_unref (ctx->keys);
REF_RELEASE (ctx->cfg);
exit (EXIT_SUCCESS);
res->name = rspamd_mempool_alloc (pool, obrace - input + 1);
rspamd_strlcpy (res->name, input, obrace - input + 1);
res->args = g_array_new (FALSE, FALSE, sizeof (struct expression_argument));
- rspamd_mempool_add_destructor (pool, rspamd_array_free_hard, res->args);
p = obrace + 1;
c = p;
arg.type = EXPRESSION_ARGUMENT_NORMAL;
arg.data = databuf;
}
- else {
- g_free (databuf);
- }
g_array_append_val (res->args, arg);
state = got_comma;
rspamd_mime_expr_destroy (rspamd_expression_atom_t *atom)
{
struct rspamd_mime_atom *mime_atom = atom->data;
- guint i;
- struct expression_argument *arg;
if (mime_atom) {
if (mime_atom->type == MIME_ATOM_INTERNAL_FUNCTION) {
/* Need to cleanup arguments */
- for (i = 0; i < mime_atom->d.func->args->len; i ++) {
- arg = &g_array_index (mime_atom->d.func->args,
- struct expression_argument, i);
-
- if (arg->type == EXPRESSION_ARGUMENT_NORMAL) {
- g_free (arg->data);
- }
- }
g_array_free (mime_atom->d.func->args, TRUE);
}
}