From: Olivier Matz Date: Fri, 2 Mar 2018 12:47:59 +0000 (+0100) Subject: fix dynamic node when build returns an error X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=90067c25015c5803cb24a2c0ec27cf027b64f0e5;p=protos%2Flibecoli.git fix dynamic node when build returns an error --- 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);