From: Ralph Dolmans Date: Mon, 3 Feb 2020 15:44:21 +0000 (+0100) Subject: - Add assertion to please static analyzer X-Git-Tag: release-1.10.0rc1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c88ab474758ab24e82cb4dc960e847f3d945923;p=thirdparty%2Funbound.git - Add assertion to please static analyzer --- diff --git a/doc/Changelog b/doc/Changelog index 5640c44f7..99ebfcb04 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +-3 February 2020: Ralph + - Add assertion to please static analyzer + 31 January 2020: Wouter - Fix fclose on error in TLS session ticket code. diff --git a/respip/respip.c b/respip/respip.c index 3dce5fa7b..ec7026add 100644 --- a/respip/respip.c +++ b/respip/respip.c @@ -913,6 +913,8 @@ respip_rewrite_reply(const struct query_info* qinfo, view = cinfo->view; ipset = cinfo->respip_set; + log_assert(ipset); + /** Try to use response-ip config from the view first; use * global response-ip config if we don't have the view or we don't * have the matching per-view config (and the view allows the use @@ -936,7 +938,7 @@ respip_rewrite_reply(const struct query_info* qinfo, if(!raddr && !view->isfirst) goto done; } - if(!raddr && ipset && (raddr = respip_addr_lookup(rep, ipset, + if(!raddr && (raddr = respip_addr_lookup(rep, ipset, &rrset_id))) { action = (enum respip_action)local_data_find_tag_action( raddr->taglist, raddr->taglen, ctaglist, ctaglen,