diff options
author | Carlos Maniero <carlos@maniero.me> | 2023-05-02 23:45:57 -0300 |
---|---|---|
committer | Johnny Richard <johnny@johnnyrichard.com> | 2023-05-03 23:01:24 +0200 |
commit | 7aebc787c5529997e422a054398ed739ca4cddfe (patch) | |
tree | dea448248b789675245925c8f7c5318839de1aeb /src/ast.c | |
parent | 0b0ce0d1735b4358691fb1d4a85b550d45ae9d48 (diff) |
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 <carlos@maniero.me>
Diffstat (limited to 'src/ast.c')
-rw-r--r-- | src/ast.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -31,7 +31,7 @@ ast_node_new(void) return node; } -static void +void ast_node_destroy_vector(vector_t *vector) { for (size_t i = 0; i < vector->size; i++) { |