From be6f41cdb5d3db9cfecf4bb066068f475c350403 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Mon, 28 Nov 2011 13:36:22 +0100 Subject: [PATCH] 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 --- src/main/conffile.c | 5 +++++ 1 file changed, 5 insertions(+) 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. */ -- 2.1.4