struct btr_node;
struct btr_node *btr_new_node(char *name, struct btr_node *parent);
+void btr_del_node(struct btr_node *btrn);
void btr_add_output(char *buf, size_t size, struct btr_node *btrn);
bool btr_is_leaf_node(struct btr_node *btrn);
}
r = &receivers[receiver_num];
rn.receiver = r;
+ rn.btr_root = btr_new_node("receiver", NULL /* no parent */);
ret = r->open(&rn);
if (ret < 0)
goto out;
ret = schedule(&s);
out:
- if (r_opened)
+ if (r_opened) {
+ btr_del_node(rn.btr_root);
r->close(&rn);
+ }
if (r)
r->shutdown();
if (ret < 0)