From 7e26e42fd715394e1a0ffecc169073f22b15b4aa Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Sat, 23 Aug 2025 10:43:26 -0400 Subject: [PATCH] don't assert if we fail to instantiate the dictionaries continuation of commit 4644f501cf3 --- src/protocols/dns/base.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/protocols/dns/base.c b/src/protocols/dns/base.c index e8695b051d..e617d9fe7c 100644 --- a/src/protocols/dns/base.c +++ b/src/protocols/dns/base.c @@ -29,6 +29,7 @@ RCSID("$Id$") #include "attrs.h" static uint32_t instance_count = 0; +static bool instantiated = false; typedef struct { uint16_t code; @@ -428,16 +429,20 @@ int fr_dns_global_init(void) goto fail; } + instantiated = true; return 0; } void fr_dns_global_free(void) { + if (!instantiated) return; + fr_assert(instance_count > 0); if (--instance_count > 0) return; fr_dict_autofree(dns_dict); + instantiated = false; } static bool attr_valid(fr_dict_attr_t *da) -- 2.47.3