]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Enumv extensions don't always contain hash tables
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 10 Dec 2020 16:57:39 +0000 (09:57 -0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 10 Dec 2020 16:57:39 +0000 (09:57 -0700)
src/lib/util/dict_fixup.c

index 0927b1f3445ff951adb82fc8d1594588ab6fc50a..4f2933fb3d0f92ae3c12a6338cb2fd91a3cdbfc8 100644 (file)
@@ -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;