From 8c88ab474758ab24e82cb4dc960e847f3d945923 Mon Sep 17 00:00:00 2001 From: Ralph Dolmans Date: Mon, 3 Feb 2020 16:44:21 +0100 Subject: [PATCH] - Add assertion to please static analyzer --- doc/Changelog | 3 +++ respip/respip.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) 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, -- 2.47.3