From 620093c2a3d306bfe4f67eede2e947025f815f5c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 26 Jul 2021 14:15:37 +0100 Subject: [Minor] One more safety check --- contrib/librdns/resolver.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'contrib/librdns') 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; -- cgit v1.2.3