]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix rrset cache create allocation failure case.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 19 Jun 2025 14:27:13 +0000 (16:27 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 19 Jun 2025 14:27:13 +0000 (16:27 +0200)
doc/Changelog
services/cache/rrset.c

index 4d745f77b9030b8a7fdd33eeea49ed5060cf0f96..b91368b9d8099bce1a484bf02a996a047e308b39 100644 (file)
@@ -2,6 +2,7 @@
        - Fix #1296: DNS over QUIC depends on a very outdated version of
          ngtcp2. Fixed so it works with ngtcp2 1.13.0 and OpenSSL 3.5.0.
        - Merge #1297: edns-subnet: fix NULL_AFTER_DEREF on subnetmod.
+       - Fix rrset cache create allocation failure case.
 
 17 June 2025: Yorgos
        - Fix for consistent use of local zone CNAME alias for configured auth
index a05ae5a56b78eac11b85b7498bdef624129f5dbd..6d5c24f8053e04e384c73eddafac4e146985beb9 100644 (file)
@@ -68,6 +68,8 @@ struct rrset_cache* rrset_cache_create(struct config_file* cfg,
        struct rrset_cache *r = (struct rrset_cache*)slabhash_create(slabs,
                startarray, maxmem, ub_rrset_sizefunc, ub_rrset_compare,
                ub_rrset_key_delete, rrset_data_delete, alloc);
+       if(!r)
+               return NULL;
        slabhash_setmarkdel(&r->table, &rrset_markdel);
        return r;
 }