From 7aebc787c5529997e422a054398ed739ca4cddfe Mon Sep 17 00:00:00 2001 From: Carlos Maniero Date: Tue, 2 May 2023 23:45:57 -0300 Subject: parser: Fixes block parser memory leak When a error occurs during a block parser the vector that stores the nodes had been destroyed but it's nodes don't. This commit fixes this by replacing the %vector_destroy% with %ast_node_destroy_vector%. Signed-off-by: Carlos Maniero --- src/ast.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ast.h') diff --git a/src/ast.h b/src/ast.h index e541390..bdace51 100644 --- a/src/ast.h +++ b/src/ast.h @@ -124,6 +124,10 @@ typedef struct ast_node_t ast_node_t * ast_node_new(void); + +void +ast_node_destroy_vector(vector_t *vector); + void ast_node_destroy(ast_node_t *node); -- cgit v1.2.3