aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/dns.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-08-14 12:51:54 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-08-14 12:51:54 +0100
commit1af89c35663dd364c8d46523f0d71adc64f8bde4 (patch)
tree1a814dea5f5ce6045bd53f2e802dd3eb87123ca0 /src/libserver/dns.c
parent0478b4ee28138a886f9b457bdba7f2897e151093 (diff)
downloadrspamd-1af89c35663dd364c8d46523f0d71adc64f8bde4.tar.gz
rspamd-1af89c35663dd364c8d46523f0d71adc64f8bde4.zip
[Fix] Add fail-safety for destroying sessions
Diffstat (limited to 'src/libserver/dns.c')
-rw-r--r--src/libserver/dns.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libserver/dns.c b/src/libserver/dns.c
index 6d488ccf3..fbf37363a 100644
--- a/src/libserver/dns.c
+++ b/src/libserver/dns.c
@@ -122,6 +122,10 @@ make_dns_request (struct rspamd_dns_resolver *resolver,
return FALSE;
}
+ if (session && rspamd_session_is_destroying (session)) {
+ return FALSE;
+ }
+
if (pool != NULL) {
reqdata =
rspamd_mempool_alloc0 (pool, sizeof (struct rspamd_dns_request_ud));