From: Howard Chu Date: Mon, 26 Sep 2005 08:15:37 +0000 (+0000) Subject: Fix tavl_delete X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~380 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=53833c6ae6734c1a0db27786f887ea1e9372791c;p=openldap Fix tavl_delete --- diff --git a/libraries/liblutil/tavl.c b/libraries/liblutil/tavl.c index 70b4eda6f3..77069393ae 100644 --- a/libraries/liblutil/tavl.c +++ b/libraries/liblutil/tavl.c @@ -251,10 +251,9 @@ tavl_delete( Avlnode **root, void* data, AVL_CMP fcmp ) *root = q; } /* new parent of p points to p */ - if ( depth > 2 ) { - r = pptr[depth-2]; + if ( depth > 1 ) { + r = pptr[depth-1]; r->avl_link[1] = p; - pptr[depth-1] = p; } else { q->avl_link[0] = p; }