From: Olivier Matz Date: Thu, 21 Mar 2019 19:22:56 +0000 (+0100) Subject: fix minor leaks X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=92a8ba50b89dabb662e6e66b3376b7cbf72d52d6;p=protos%2Flibecoli.git fix minor leaks --- 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);