Parser: Fix fetch_section_first when the section doesn't exist

This commit is contained in:
Martin Duquesnoy
2010-04-17 14:24:08 +02:00
parent 5875af2949
commit 3811d61858
2 changed files with 4 additions and 0 deletions

View File

@@ -503,6 +503,9 @@ fetch_section_first(struct conf_sec *s, char *name)
if (!strcmp(sec->name, name))
return sec;
if(!sec)
return NULL;
TAILQ_FOREACH(sec, &s->sub, entry)
if (!strcmp(sec->name, name))
return sec;