rb_tree: fix possible access-after-free-error in trbt_traversearray32_node
authorMichael Adam <obnox@samba.org>
Thu, 22 Dec 2011 17:09:36 +0000 (18:09 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 23 Dec 2011 16:39:00 +0000 (17:39 +0100)
commit8b0caaeed154d26c67a73659d3bbbdd63b21be11
tree103484aae010f0d22379f6cc7338e2064ed73b35
parent6c4d1b768ccade344a7462ecad7cf5cbbf3873d4
rb_tree: fix possible access-after-free-error in trbt_traversearray32_node

When the traverse callback frees the current node, the traverse of the
rbtree can fail (the next node->right fails since node is not there any more...).
This is fixed by introducing variables to store the right (and left)
pointers before the callback is called.
common/rb_tree.c