From 90067c25015c5803cb24a2c0ec27cf027b64f0e5 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Fri, 2 Mar 2018 13:47:59 +0100 Subject: [PATCH] fix dynamic node when build returns an error --- lib/ecoli_node_dynamic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ecoli_node_dynamic.c b/lib/ecoli_node_dynamic.c index c9c5bfa..de99f1b 100644 --- a/lib/ecoli_node_dynamic.c +++ b/lib/ecoli_node_dynamic.c @@ -61,7 +61,7 @@ ec_node_dynamic_parse(const struct ec_node *gen_node, struct ec_node *child = NULL; void (*node_free)(struct ec_node *) = ec_node_free; char key[64]; - int ret; + int ret = -1; child = node->build(parsed, node->opaque); if (child == NULL) @@ -92,7 +92,7 @@ ec_node_dynamic_complete(const struct ec_node *gen_node, struct ec_node *child = NULL; void (*node_free)(struct ec_node *) = ec_node_free; char key[64]; - int ret; + int ret = -1; parsed = ec_completed_get_state(completed); child = node->build(parsed, node->opaque); -- 2.39.5