From: Vsevolod Stakhov Date: Mon, 26 Jul 2021 13:15:37 +0000 (+0100) Subject: [Minor] One more safety check X-Git-Tag: 3.0~100 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=620093c2a3d306bfe4f67eede2e947025f815f5c;p=rspamd.git [Minor] One more safety check --- 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;