]> git.sur5r.net Git - openldap/commitdiff
tavl_delete: copy balance factor
authorHoward Chu <hyc@openldap.org>
Thu, 22 Sep 2005 01:16:28 +0000 (01:16 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 22 Sep 2005 01:16:28 +0000 (01:16 +0000)
libraries/liblutil/tavl.c

index 988b7b750b86e86e81348664710d68f8470be9ef..d2a4ccf4285c92a31d7c03606826b27b480e9256 100644 (file)
@@ -239,6 +239,8 @@ tavl_delete( Avlnode **root, void* data, AVL_CMP fcmp )
                p->avl_bits[1] = q->avl_bits[1];
                q->avl_bits[0] = q->avl_bits[1] = AVL_CHILD;
 
+               q->avl_bf = p->avl_bf;
+
                /* fix stack positions: old parent of p points to q */
                pptr[side] = q;
                if ( side ) {