aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/dns.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-08-21 16:26:51 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-08-21 16:26:51 +0100
commit679a5e1f14168b32053b5c72f3115205fdbd0629 (patch)
tree42c7059a6d7515d3839b89bec4709b9b9ad713f0 /src/libserver/dns.c
parent763bc588d221eecdbd607c88d4950ec5cf5d04da (diff)
downloadrspamd-679a5e1f14168b32053b5c72f3115205fdbd0629.tar.gz
rspamd-679a5e1f14168b32053b5c72f3115205fdbd0629.zip
Fix session-less resolver.
Diffstat (limited to 'src/libserver/dns.c')
-rw-r--r--src/libserver/dns.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libserver/dns.c b/src/libserver/dns.c
index aa4877783..1410442b7 100644
--- a/src/libserver/dns.c
+++ b/src/libserver/dns.c
@@ -63,15 +63,15 @@ rspamd_dns_callback (struct rdns_reply *reply, gpointer ud)
reqdata->cb (reply, reqdata->ud);
- /*
- * Ref event to avoid double unref by
- * event removing
- */
- rdns_request_retain (reply->request);
if (reqdata->session) {
- remove_normal_event (reqdata->session, rspamd_dns_fin_cb, reqdata->req);
+ /*
+ * Ref event to avoid double unref by
+ * event removing
+ */
+ rdns_request_retain (reply->request);
+ remove_normal_event (reqdata->session, rspamd_dns_fin_cb, reqdata);
}
- if (reqdata->pool == NULL) {
+ else if (reqdata->pool == NULL) {
g_slice_free1 (sizeof (struct rspamd_dns_request_ud), reqdata);
}
}