]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't use ci to iterate over subsections if we might need to use it for logging later
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 18 Sep 2012 13:15:14 +0000 (14:15 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 18 Sep 2012 13:15:33 +0000 (14:15 +0100)
src/main/modcall.c

index bb1112d7ec4f6181b1a1a4d9a97dacd7016ca520..eba6f94cc1f6fd99c555e7de565a6ce224bae861 100644 (file)
@@ -2005,21 +2005,22 @@ static modcallable *do_compile_modsingle(modcallable *parent,
         *      maybe a csingle as a ref?
         */
        if (cf_item_is_section(ci)) {
+               CONF_ITEM *csi;
+               
                cs = cf_itemtosection(ci);
+               for (csi=cf_item_find_next(cs, NULL);
+                    csi != NULL;
+                    csi=cf_item_find_next(cs, csi)) {
 
-               for (ci=cf_item_find_next(cs, NULL);
-                    ci != NULL;
-                    ci=cf_item_find_next(cs, ci)) {
-
-                       if (cf_item_is_section(ci)) {
-                               cf_log_err(ci, "Subsection of module instance call not allowed");
+                       if (cf_item_is_section(csi)) {
+                               cf_log_err(csi, "Subsection of module instance call not allowed");
                                modcallable_free(&csingle);
                                return NULL;
                        }
 
-                       if (!cf_item_is_pair(ci)) continue;
+                       if (!cf_item_is_pair(csi)) continue;
 
-                       if (!compile_action(csingle, cf_itemtopair(ci))) {
+                       if (!compile_action(csingle, cf_itemtopair(csi))) {
                                modcallable_free(&csingle);
                                return NULL;
                        }