fix use-after-free in rbtree
Merge pull request #4 from ebfe/fix-use-after-free-rbtree

fix use-after-free in rbtree