hoxworth/redis — pull request #1 by llimllib (2012-08-20 23:43:03+00:00)
Title: fixing avlRemoveNode memory leak

There were two main bugs

* freeNodeMem should be recursed on just the same as it was recieved, except
in the case where we are using avlRemoveTree to remove a replacement node. In
that case we want to use the freeNodeMem=0 flag.

* In the case where the node to be removed wasn't the root node, and had both
right and left branches, the code was not setting its parents' left and/or right
pointer to point to the replacement node

* Also, I removed a few tests that I had added before I arrived at a smaller test
case for demonstrating the same problem.