]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
nitialize data pointer before setting it
authorAlan T. DeKok <aland@freeradius.org>
Mon, 28 Nov 2011 12:36:22 +0000 (13:36 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 28 Nov 2011 12:37:27 +0000 (13:37 +0100)
So that if there's an error setting it, we can free it without
the system blowing up.

Closes Debian bug #606450

src/main/conffile.c

index e206da1688883598524dab135a15d79a80360398..29ad97be8ab75f5f090f6e03173960a2ec5f4d86 100644 (file)
@@ -1144,6 +1144,11 @@ int cf_section_parse(CONF_SECTION *cs, void *base,
                        goto error;
                }
 
+               if ((variables[i].type == PW_TYPE_STRING_PTR) ||
+                   (variables[i].type == PW_TYPE_FILENAME)) {
+                       *(char **) data = NULL;
+               }
+
                /*
                 *      Parse the pair we found, or a default value.
                 */