]> git.droids-corp.org - protos/libecoli.git/blobdiff - lib/ecoli_node_or.c
save
[protos/libecoli.git] / lib / ecoli_node_or.c
index ddf8281e970e322c6f9cc383224dc9d791afcd0d..c0d43e22ca17f5f87c979f0db81447bf6787fae4 100644 (file)
@@ -123,16 +123,13 @@ int ec_node_or_add(struct ec_node *gen_node, struct ec_node *child)
                return -EINVAL;
 
        table = ec_realloc(node->table, (node->len + 1) * sizeof(*node->table));
-       if (table == NULL) {
-               ec_node_free(child);
+       if (table == NULL)
                return -1;
-       }
 
        node->table = table;
        table[node->len] = child;
        node->len++;
 
-       child->parent = gen_node;
        TAILQ_INSERT_TAIL(&gen_node->children, child, next);
 
        return 0;