From: Arran Cudbard-Bell Date: Thu, 10 Dec 2020 16:57:39 +0000 (-0700) Subject: Enumv extensions don't always contain hash tables X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee9b53ab1d002571b4a56bdb0c0928189d0bbd79;p=thirdparty%2Ffreeradius-server.git Enumv extensions don't always contain hash tables --- diff --git a/src/lib/util/dict_fixup.c b/src/lib/util/dict_fixup.c index 0927b1f3445..4f2933fb3d0 100644 --- a/src/lib/util/dict_fixup.c +++ b/src/lib/util/dict_fixup.c @@ -531,18 +531,16 @@ static int _dict_attr_fixup_hash_tables(fr_dict_attr_t const *da, UNUSED void *u ext = fr_dict_attr_ext(da, FR_DICT_ATTR_EXT_ENUMV); if (ext) { - fr_hash_table_fill(ext->value_by_name); - fr_hash_table_fill(ext->name_by_value); + if (ext->value_by_name) fr_hash_table_fill(ext->value_by_name); + if (ext->name_by_value) fr_hash_table_fill(ext->name_by_value); } } { - fr_dict_attr_ext_namespace_t *ext; + fr_hash_table_t *hash; - ext = fr_dict_attr_ext(da, FR_DICT_ATTR_EXT_NAMESPACE); - if (ext) { - fr_hash_table_fill(ext->namespace); - } + hash = dict_attr_namespace(da); + if (hash) fr_hash_table_fill(hash); } return 0;