]> git.ozlabs.org Git - ccan/commit
rbtree: don't use temporary context to destroy rbtree
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 10 Jan 2011 05:17:24 +0000 (15:47 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 10 Jan 2011 05:17:24 +0000 (15:47 +1030)
commit7467dfe718aa1de8eba6fb16d2eb8b5b2248e017
treeaa3a044a8417f030f0cfc1fc0e1588fb2d18b8e2
parentc0ea2922129a17724930f1c3b535985d7576d63e
rbtree: don't use temporary context to destroy rbtree

It leads to a memory leak if the allocation fails (as we reparent onto NULL).
Also, the extra allocation in the failure path increases test time for
failtest (under valgrind) by a factor of 2.
ccan/rbtree/rbtree.c