From: W.C.A. Wijngaards Date: Tue, 14 Apr 2026 13:36:00 +0000 (+0200) Subject: - Fix clang analyzer warning for subnetmod, when return_msg is X-Git-Tag: release-1.25.0rc1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95083d4377c0a6c52d51a17a1ad15ae078df12e1;p=thirdparty%2Funbound.git - Fix clang analyzer warning for subnetmod, when return_msg is NULL for update cache, like when it stores servfail status. --- diff --git a/doc/Changelog b/doc/Changelog index 761e2a4f6..aa3cef029 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,8 @@ 14 April 2026: Wouter - Fix #1017: memory corruption related core dumps. When alloc_reg_obtain has an empty list, return a new allocation. + - Fix clang analyzer warning for subnetmod, when return_msg is + NULL for update cache, like when it stores servfail status. 13 April 2026: Yorgos - Update the documentation of 'max-query-restarts' in the man page. diff --git a/edns-subnet/subnetmod.c b/edns-subnet/subnetmod.c index 2ed0ef931..ba600ae0e 100644 --- a/edns-subnet/subnetmod.c +++ b/edns-subnet/subnetmod.c @@ -456,6 +456,10 @@ update_cache(struct module_qstate *qstate, int id) diff_size); return; } + if(!qstate->return_msg) { + lock_rw_unlock(&lru_entry->lock); + return; + } /* Step 2, find the correct tree */ if (!(tree = get_tree(lru_entry->data, edns, sne, qstate->env->cfg))) { lock_rw_unlock(&lru_entry->lock);