From: Howard Chu Date: Sun, 4 Jul 2004 04:56:36 +0000 (+0000) Subject: Plug memleak from ITS#2895 X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~120 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c3984d9f596ca79f6755012f997070c189a533fe;p=openldap Plug memleak from ITS#2895 --- diff --git a/servers/slapd/back-bdb/id2entry.c b/servers/slapd/back-bdb/id2entry.c index fce1fcdc63..d4eb267111 100644 --- a/servers/slapd/back-bdb/id2entry.c +++ b/servers/slapd/back-bdb/id2entry.c @@ -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;