[btr] Split btr_del_node() into two functions.
[paraslash.git] / recv.c
diff --git a/recv.c b/recv.c
index 57931943b4a02bdcaa501d0a149388c7d1874a0c..c8edb5936e231d493c4f801456eeecb6a2a0da7a 100644 (file)
--- a/recv.c
+++ b/recv.c
@@ -98,7 +98,7 @@ int main(int argc, char *argv[])
        r_opened = 1;
 
        if (conf.buffer_tree_given)
-               sot.btrn = btr_new_node("stdout", rn.btrn, NULL);
+               sot.btrn = btr_new_node("stdout", rn.btrn, NULL, NULL);
 
        stdout_set_defaults(&sot);
        sot.bufp = &rn.buf;
@@ -113,6 +113,8 @@ int main(int argc, char *argv[])
 
        ret = schedule(&s);
 out:
+       if (conf.buffer_tree_given)
+               btr_free_node(sot.btrn);
        if (r_opened)
                r->close(&rn);
        if (r)