]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix clang analyzer warning for subnetmod, when return_msg is
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 14 Apr 2026 13:36:00 +0000 (15:36 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 14 Apr 2026 13:36:00 +0000 (15:36 +0200)
  NULL for update cache, like when it stores servfail status.

doc/Changelog
edns-subnet/subnetmod.c

index 761e2a4f6906b1b5cfa7625583d6d74b30e23970..aa3cef0294da6317661f94a656318874153099b8 100644 (file)
@@ -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.
index 2ed0ef931d421e999379c5d55258792dad6cb0f0..ba600ae0e3b1d10a1be350d5163383c656a9c7d0 100644 (file)
@@ -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);