}
/*
- * No parent means we need to go hunting through all the dictionaries
+ * No parent means we use the default dictionary.
*/
if (!our_parent) {
(void)fr_dict_attr_search_by_qualified_name_substr(&dict_err, &da,
* or its reference in the case of group attributes.
*/
} else {
+ fr_assert(namespace != NULL);
+
(void)fr_dict_attr_by_name_substr(&dict_err,
&da,
namespace,
goto error;
}
+ fr_assert(our_parent != NULL);
+ fr_assert(namespace != NULL);
+
/*
* See if the ref begins with an unsigned integer
* if it does it's probably an OID component
* attribute of type "group".
*/
if (ref != fr_dict_root(fr_dict_internal())) {
- our_parent = namespace = ref;
+ namespace = ref;
- } else {
- fr_assert(at_rules->dict_def);
+ } else if (at_rules->dict_def) {
+ namespace = fr_dict_root(at_rules->dict_def);
- our_parent = namespace = fr_dict_root(at_rules->dict_def);
+ } else {
+ namespace = NULL;
}
+ our_parent = NULL;
break;
case FR_TYPE_STRUCT: