mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 16:37:27 +00:00
lib: Fix use after free in lexer
Fix occasional bug where deleting flex's input buffer happens earlier than flex expects Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
4427e9b3ee
commit
07079d78bc
@ -152,7 +152,6 @@ start:
|
||||
{
|
||||
// tack on the command element
|
||||
terminate_graph (startnode, currnode, element);
|
||||
cleanup();
|
||||
}
|
||||
| sentence_root cmd_token_seq '.' placeholder_token
|
||||
{
|
||||
@ -165,7 +164,6 @@ start:
|
||||
|
||||
// tack on the command element
|
||||
terminate_graph (startnode, currnode, element);
|
||||
cleanup();
|
||||
}
|
||||
|
||||
sentence_root: WORD
|
||||
@ -396,6 +394,9 @@ parse_command_format(struct graph_node *start, struct cmd_element *cmd)
|
||||
// parse command into DFA
|
||||
yyparse (cmd, start);
|
||||
|
||||
/* cleanup */
|
||||
cleanup ();
|
||||
|
||||
return start;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user