From 92a8ba50b89dabb662e6e66b3376b7cbf72d52d6 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Thu, 21 Mar 2019 20:22:56 +0100 Subject: [PATCH] fix minor leaks --- src/ecoli_node_many.c | 1 + src/ecoli_node_re_lex.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/ecoli_node_many.c b/src/ecoli_node_many.c index dfdd866..0850ae7 100644 --- a/src/ecoli_node_many.c +++ b/src/ecoli_node_many.c @@ -330,6 +330,7 @@ struct ec_node *ec_node_many(const char *id, struct ec_node *child, return gen_node; fail: + ec_node_free(gen_node); ec_node_free(child); return NULL; } diff --git a/src/ecoli_node_re_lex.c b/src/ecoli_node_re_lex.c index 4ebb9fd..e7751ac 100644 --- a/src/ecoli_node_re_lex.c +++ b/src/ecoli_node_re_lex.c @@ -345,6 +345,7 @@ static int ec_node_re_lex_set_config(struct ec_node *gen_node, node->child = ec_node_clone(child->node); for (i = 0; i < (ssize_t)node->len; i++) { ec_free(node->table[i].pattern); + ec_free(node->table[i].attr_name); regfree(&node->table[i].r); } ec_free(node->table); -- 2.39.5