aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/librdns
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-26 14:15:37 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-26 14:15:37 +0100
commit620093c2a3d306bfe4f67eede2e947025f815f5c (patch)
treede3e59102ae13e50faf10dc04c272dccb5fa1a53 /contrib/librdns
parent49dd721646ed4a86d80a2b0073f22b7c0e51b109 (diff)
downloadrspamd-620093c2a3d306bfe4f67eede2e947025f815f5c.tar.gz
rspamd-620093c2a3d306bfe4f67eede2e947025f815f5c.zip
[Minor] One more safety check
Diffstat (limited to 'contrib/librdns')
-rw-r--r--contrib/librdns/resolver.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/librdns/resolver.c b/contrib/librdns/resolver.c
index 6036c74a8..6e3792f7e 100644
--- a/contrib/librdns/resolver.c
+++ b/contrib/librdns/resolver.c
@@ -150,7 +150,13 @@ rdns_make_reply (struct rdns_request *req, enum dns_rcode rcode)
rep->code = rcode;
req->reply = rep;
rep->authenticated = false;
- rep->requested_name = req->requested_names[0].name;
+
+ if (req) {
+ rep->requested_name = req->requested_names[0].name;
+ }
+ else {
+ rep->requested_name = NULL;
+ }
}
return rep;