Fail if we can't find an xlat by this name
authorAlan T. DeKok <aland@freeradius.org>
Fri, 14 Nov 2014 19:18:29 +0000 (14:18 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 24 Nov 2014 22:07:05 +0000 (17:07 -0500)
src/main/xlat.c

index 5d13433..cabb6f0 100644 (file)
@@ -906,11 +906,18 @@ bool xlat_register_redundant(CONF_SECTION *cs)
                     ci != NULL;
                     ci = cf_item_find_next(cs, ci)) {
                        if (!cf_item_is_pair(ci)) continue;
+
+                       if (!xlat_find(cf_pair_attr(cf_itemtopair(ci)))) {
+                               talloc_free(xr);
+                               return false;
+                       }
+
                        xr->count++;
                }
        }
 
        if (xlat_register(name2, xlat_redundant, NULL, xr) < 0) {
+               talloc_free(xr);
                return false;
        }