From 5d2accea50178b435580bd44ca916d271b4f2e11 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 18 Dec 1998 18:06:30 +0000 Subject: [PATCH] Patch cache_delete_entry_internal() as suggested by Daniel Carroll This patch ensures we try deleting the entry from both the dntree and the idtree. --- servers/slapd/back-ldbm/cache.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-ldbm/cache.c b/servers/slapd/back-ldbm/cache.c index 1ab9896cca..01a92295df 100644 --- a/servers/slapd/back-ldbm/cache.c +++ b/servers/slapd/back-ldbm/cache.c @@ -417,18 +417,24 @@ cache_delete_entry_internal( Entry *e ) { + int rc = 0; /* return code */ + /* dn tree */ if ( avl_delete( &cache->c_dntree, (caddr_t) e, cache_entrydn_cmp ) == NULL ) { - return( -1 ); + rc = -1; } /* id tree */ if ( avl_delete( &cache->c_idtree, (caddr_t) e, cache_entryid_cmp ) == NULL ) { - return( -1 ); + rc = -1; + } + + if (rc != 0) { + return rc; } /* lru */ -- 2.39.5