Skip to content

Commit

Permalink
[Minor] Allocate memory from cfg pool to avoid leak
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Sep 27, 2019
1 parent fecc373 commit bb98479
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libserver/dns.c
Expand Up @@ -270,7 +270,7 @@ rspamd_dns_server_init (struct upstream *up, guint idx, gpointer ud)

g_assert (serv != NULL);

elt = g_malloc0 (sizeof (*elt));
elt = rspamd_mempool_alloc0 (r->cfg->cfg_pool, sizeof (*elt));
elt->server = serv;
elt->lib_data = up;

Expand Down

0 comments on commit bb98479

Please sign in to comment.