projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
784fa51
)
Allow parentcs to be NULL when referencing sections
author
Alan T. DeKok
<aland@freeradius.org>
Sun, 20 Jul 2008 07:19:18 +0000
(09:19 +0200)
committer
Alan T. DeKok
<aland@freeradius.org>
Sun, 20 Jul 2008 07:19:18 +0000
(09:19 +0200)
src/main/conffile.c
patch
|
blob
|
history
diff --git
a/src/main/conffile.c
b/src/main/conffile.c
index
fb96052
..
c95567f
100644
(file)
--- a/
src/main/conffile.c
+++ b/
src/main/conffile.c
@@
-564,6
+564,8
@@
CONF_ITEM *cf_reference_item(const CONF_SECTION *parentcs,
* "foo.bar.baz" means "from the root"
*/
} else if (strchr(p, '.') != NULL) {
+ if (!parentcs) goto no_such_item;
+
cs = parentcs;
}
@@
-634,7
+636,7
@@
CONF_ITEM *cf_reference_item(const CONF_SECTION *parentcs,
/*
* "foo" is "in the current section, OR in main".
*/
- if ((p == name) && (cs != parentcs)) {
+ if ((p == name) && (
parentcs != NULL) && (
cs != parentcs)) {
cs = parentcs;
goto retry;
}