From 56498a59ddce902c3d594b9b7d4db04464f8bd7b Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 19 Oct 2003 09:55:31 +0000 Subject: [PATCH] ITS#2780, redundant cache add --- servers/slapd/back-bdb/cache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/servers/slapd/back-bdb/cache.c b/servers/slapd/back-bdb/cache.c index f18e21ce20..234f2cf85d 100644 --- a/servers/slapd/back-bdb/cache.c +++ b/servers/slapd/back-bdb/cache.c @@ -744,6 +744,8 @@ bdb_cache_add( if ( eip->bei_dkids ) eip->bei_dkids++; #endif rc = bdb_entryinfo_add_internal( bdb, &ei, &new ); + /* bdb_csn_commit can cause this when adding the database root entry */ + if ( new->bei_e ) bdb_entry_return( new->bei_e ); new->bei_e = e; e->e_private = new; new->bei_state = CACHE_ENTRY_NO_KIDS | CACHE_ENTRY_NO_GRANDKIDS;