From: Alan T. DeKok Date: Mon, 28 Nov 2011 12:36:22 +0000 (+0100) Subject: nitialize data pointer before setting it X-Git-Tag: release_3_0_0_beta0~466 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=be6f41cdb5d3db9cfecf4bb066068f475c350403;p=freeradius.git nitialize data pointer before setting it So that if there's an error setting it, we can free it without the system blowing up. Closes Debian bug #606450 --- diff --git a/src/main/conffile.c b/src/main/conffile.c index e206da1..29ad97b 100644 --- a/src/main/conffile.c +++ b/src/main/conffile.c @@ -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. */