path: root/src/parser_bison.y
diff options
authorPablo Neira Ayuso <>2019-06-05 11:56:11 +0200
committerPablo Neira Ayuso <>2019-06-05 17:54:21 +0200
commit60e917fa7cb55b4f675110bae78df56cd49bd486 (patch)
treee54c4b49146ce50f035a04e5f985fb2c690a9c08 /src/parser_bison.y
parent5db92ace9263ea1daa1d10c6f3a04ecc97317258 (diff)
src: dynamic input_descriptor allocation
This patch introduces the input descriptor list, that stores the existing input descriptor objects. These objects are now dynamically allocated and release from scanner_destroy() path. Follow up patches that decouple the parsing and the evaluation phases require this for error reporting as described by b14572f72aac ("erec: Fix input descriptors for included files"), this patch partially reverts such partial. Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'src/parser_bison.y')
1 files changed, 1 insertions, 0 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 62e76fe6..2a39db31 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -50,6 +50,7 @@ void parser_init(struct nft_ctx *nft, struct parser_state *state,
state->scopes[0] = scope_init(&state->top_scope, NULL);
state->ectx.nft = nft;
state->ectx.msgs = msgs;
+ init_list_head(&state->indesc_list);
static void yyerror(struct location *loc, struct nft_ctx *nft, void *scanner,