diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-27 12:51:33 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-27 12:51:33 +0100 |
commit | bb984797509bef43632de51facaede93ab482278 (patch) | |
tree | ae6300cd277141bf3b371c0891d8bbe346d77b64 /src | |
parent | fecc373a98341f5587bebb714d64f8773de8e32e (diff) | |
download | rspamd-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.c | 2 |
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; |