From c3984d9f596ca79f6755012f997070c189a533fe Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 4 Jul 2004 04:56:36 +0000 Subject: [PATCH] Plug memleak from ITS#2895 --- servers/slapd/back-bdb/id2entry.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.39.5