]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
check ptr
authorAlan T. DeKok <aland@freeradius.org>
Sun, 5 Feb 2017 16:17:46 +0000 (11:17 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 5 Feb 2017 18:17:34 +0000 (13:17 -0500)
src/main/conffile.c

index 453e5ba19c7ff299bb6fc7d4526ec6f91121835e..941f02e1f36e3cf95544800f5daa96802646dbb8 100644 (file)
@@ -2253,11 +2253,11 @@ static void cf_section_parse_init(CONF_SECTION *cs, void *base, CONF_PARSER cons
                         *      Set the is_set field for the subsection.
                         */
                        if (variables[i].type & PW_TYPE_IS_SET) {
-                               bool *is_set = NULL;
+                               bool *is_set;
 
                                is_set = variables[i].data ? variables[i].is_set_ptr :
                                                             ((uint8_t *)base) + variables[i].is_set_offset;
-                               *is_set = !!subcs;
+                               if (is_set) *is_set = !!subcs;
                        }
 
                        /*