]> 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:45:31 +0000 (13:45 +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 8fb25783cab4924b5124a7b3d8b6a097f38594cd..f09c227b78c29777ffea6b43a27ef1a06f593c52 100644 (file)
@@ -1101,6 +1101,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.
                 */