projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c0a9d8
)
nitialize data pointer before setting it
author
Alan T. DeKok
<aland@freeradius.org>
Mon, 28 Nov 2011 12:36:22 +0000
(13:36 +0100)
committer
Alan 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
patch
|
blob
|
history
diff --git
a/src/main/conffile.c
b/src/main/conffile.c
index
e206da1
..
29ad97b
100644
(file)
--- 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.
*/