In case of failing command evaluation, commands need to be freed as
their memory becomes orphaned afterwards.
Signed-off-by: Phil Sutter <phil@nwl.cc>
list_add_tail(&$2->list, &list);
if (cmd_evaluate(&state->ectx, $2) < 0) {
+ cmd_free($2);
if (++state->nerrs == nft->parser_max_errors)
YYABORT;
} else
list_add_tail(&$1->list, &list);
if (cmd_evaluate(&state->ectx, $1) < 0) {
+ cmd_free($1);
if (++state->nerrs == nft->parser_max_errors)
YYABORT;
} else