]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Check for !cs before expanding variables
authorAlan T. DeKok <aland@freeradius.org>
Thu, 21 Feb 2013 00:37:54 +0000 (19:37 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 21 Feb 2013 00:38:11 +0000 (19:38 -0500)
src/main/conffile.c

index 3e6bcbbc33fde20974172d2af733f150641e40ed..9e0f960bd95a3cff819b229245f7ac4d12c5c160 100644 (file)
@@ -840,12 +840,12 @@ int cf_item_parse(CONF_SECTION *cs, const char *name,
                 *      expanded automagically when the configuration
                 *      file was read.
                 */
-               if (value == dflt) {
+               if (cs && (value == dflt)) {
                        char buffer[8192];
 
                        int lineno = 0;
 
-                       if (cs) lineno = cs->item.lineno;
+                       lineno = cs->item.lineno;
 
                        /*
                         *      FIXME: sizeof(buffer)?