From: Kurt Zeilenga Date: Fri, 18 Dec 1998 18:06:30 +0000 (+0000) Subject: Patch cache_delete_entry_internal() as suggested by X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~921 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5d2accea50178b435580bd44ca916d271b4f2e11;p=openldap 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. --- 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 */