Don't expand variables if cs==NULL
authorAlan T. DeKok <aland@freeradius.org>
Sun, 17 Feb 2013 16:45:43 +0000 (11:45 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 17 Feb 2013 16:58:39 +0000 (11:58 -0500)
Closes Coverity #720373

src/main/conffile.c

index 7982aaa..a63ca33 100644 (file)
@@ -969,13 +969,11 @@ int cf_item_parse(CONF_SECTION *cs, const char *name,
                 *      expanded automagically when the configuration
                 *      file was read.
                 */
-               if (value == dflt) {
+               if ((value == dflt) && cs) {
                        char buffer[8192];
 
                        int lineno = 0;
 
-                       if (cs) lineno = cs->item.lineno;
-
                        /*
                         *      FIXME: sizeof(buffer)?
                         */