conf: reset global pointers after parsing line
Don't leave dangling pointers in CNF_ParseLine().
This commit is contained in:
parent
1b82604f61
commit
e1d9a57bd0
1 changed files with 5 additions and 1 deletions
6
conf.c
6
conf.c
|
@ -491,8 +491,10 @@ CNF_ParseLine(const char *filename, int number, char *line)
|
|||
CPS_NormalizeLine(line);
|
||||
|
||||
/* Skip blank lines */
|
||||
if (!*line)
|
||||
if (!*line) {
|
||||
processed_file = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
/* We have a real line, now try to match commands */
|
||||
processed_command = command = line;
|
||||
|
@ -673,6 +675,8 @@ CNF_ParseLine(const char *filename, int number, char *line)
|
|||
} else {
|
||||
other_parse_error("Invalid command");
|
||||
}
|
||||
|
||||
processed_file = processed_command = NULL;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
|
Loading…
Reference in a new issue