When over-writing data, free old data (if necessary), before
authoraland <aland>
Fri, 14 May 2004 08:34:44 +0000 (08:34 +0000)
committeraland <aland>
Fri, 14 May 2004 08:34:44 +0000 (08:34 +0000)
replacing it

src/lib/rbtree.c

index a1007f3..a9fc494 100644 (file)
@@ -261,6 +261,7 @@ int rbtree_insert(rbtree_t *tree, const void *Data)
                        /*
                         *      Do replace the entry.
                         */
+                       if (tree->freeNode) tree->freeNode(Current->Data);
                        Current->Data = Data;
                        return 1;
                }