aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-27 12:51:33 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-27 12:51:33 +0100
commitbb984797509bef43632de51facaede93ab482278 (patch)
treeae6300cd277141bf3b371c0891d8bbe346d77b64 /src
parentfecc373a98341f5587bebb714d64f8773de8e32e (diff)
downloadrspamd-bb984797509bef43632de51facaede93ab482278.tar.gz
rspamd-bb984797509bef43632de51facaede93ab482278.zip
[Minor] Allocate memory from cfg pool to avoid leak
Diffstat (limited to 'src')
-rw-r--r--src/libserver/dns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libserver/dns.c b/src/libserver/dns.c
index bbc9c2b45..f6e533523 100644
--- a/src/libserver/dns.c
+++ b/src/libserver/dns.c
@@ -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;