]> git.sur5r.net Git - openldap/commitdiff
Patch cache_delete_entry_internal() as suggested by
authorKurt Zeilenga <kurt@openldap.org>
Fri, 18 Dec 1998 18:06:30 +0000 (18:06 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 18 Dec 1998 18:06:30 +0000 (18:06 +0000)
  Daniel Carroll <dan@mesa7.mesa.colorado.edu>
This patch ensures we try deleting the entry from both the
dntree and the idtree.

servers/slapd/back-ldbm/cache.c

index 1ab9896cca3f59f32e8b2951a5ef23a9f7335b77..01a92295df87d35dbafa2f37994085d77804c814 100644 (file)
@@ -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 */