]> git.sur5r.net Git - openldap/commitdiff
Plug memleak from ITS#2895
authorHoward Chu <hyc@openldap.org>
Sun, 4 Jul 2004 04:56:36 +0000 (04:56 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 4 Jul 2004 04:56:36 +0000 (04:56 +0000)
servers/slapd/back-bdb/id2entry.c

index fce1fcdc637266ec84f2a2a67ac290785be08328..d4eb26711119a21037a44c44bfb0832f1362fcf5 100644 (file)
@@ -202,6 +202,10 @@ int bdb_entry_release(
                        SLAP_TRUNCATE_MODE, SLAP_UNDEFINED_MODE */
  
        if ( slapMode == SLAP_SERVER_MODE ) {
+               /* If not in our cache, just free it */
+               if ( !e->e_private ) {
+                       return bdb_entry_return( e );
+               }
                /* free entry and reader or writer lock */
                if ( o ) {
                        boi = (struct bdb_op_info *)o->o_private;