aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/librdns
diff options
context:
space:
mode:
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;