aboutsummaryrefslogtreecommitdiffstats
path: root/src/dns.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-02-24 19:45:30 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-02-24 19:45:30 +0300
commit3f610ca7f6341261112fc372a8f53b5c40fb6be6 (patch)
tree9c231f781c7c4be94b05b30dad6076f4206310d0 /src/dns.c
parent121efbcddf8ec41eea91aa80574dab3730bf8976 (diff)
downloadrspamd-3f610ca7f6341261112fc372a8f53b5c40fb6be6.tar.gz
rspamd-3f610ca7f6341261112fc372a8f53b5c40fb6be6.zip
Fix several memory leaks in rspamd.
Diffstat (limited to 'src/dns.c')
-rw-r--r--src/dns.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dns.c b/src/dns.c
index a87001260..e11d03582 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -955,6 +955,9 @@ dns_parse_reply (guint8 *in, gint r, struct rspamd_dns_resolver *resolver, struc
rep->elements = g_list_prepend (rep->elements, elt);
}
}
+ if (rep->elements) {
+ memory_pool_add_destructor (req->pool, (pool_destruct_func)g_list_free, rep->elements);
+ }
return rep;
}