Skip to content

Commit

Permalink
Bugfix: do not free grammar on failure
Browse files Browse the repository at this point in the history
When yaep_read_grammar() fails, it must not free the grammar; this needs
to be done by the caller of yaep_create_grammar().

See vnmakarov#16 (comment)
  • Loading branch information
TheCount committed Oct 7, 2018
1 parent 55d622e commit aefbc34
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/yaep.c
Original file line number Diff line number Diff line change
Expand Up @@ -3303,7 +3303,6 @@ yaep_read_grammar (struct grammar *g, int strict_p,
rules_ptr = g->rules_ptr;
if ((code = setjmp (error_longjump_buff)) != 0)
{
yaep_free_grammar (grammar);
return code;
}
if (!grammar->undefined_p)
Expand Down

0 comments on commit aefbc34

Please sign in to comment.