projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a95df4c
)
Proper checks on group-type sections
author
Alan T. DeKok
<aland@freeradius.org>
Wed, 17 Jul 2013 09:45:04 +0000
(11:45 +0200)
committer
Alan T. DeKok
<aland@freeradius.org>
Wed, 17 Jul 2013 09:45:27 +0000
(11:45 +0200)
This should really be a flag rather than a compile-time check
src/main/modcall.c
patch
|
blob
|
history
diff --git
a/src/main/modcall.c
b/src/main/modcall.c
index
f430283
..
2dd29c9
100644
(file)
--- a/
src/main/modcall.c
+++ b/
src/main/modcall.c
@@
-2232,11
+2232,15
@@
void add_to_modcallable(modcallable **parent, modcallable *this,
void modcallable_free(modcallable **pc)
{
modcallable *c, *loop, *next;
+
+ if (!pc || !*pc) return;
+
c = *pc;
- if (c->type != MOD_SINGLE) {
+
+ if ((c->type > MOD_SINGLE) && (c->type <= MOD_POLICY)) {
modgroup *g = mod_callabletogroup(c);
- if (g->children) for(loop = g->children;
+ if (g->children) for
(loop = g->children;
loop ;
loop = next) {
next = loop->next;