From 225aa9f52667bb51eeaea6f89e637b1bc1b97b08 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 2 Mar 2009 07:57:18 +0000 Subject: [PATCH] More for prev --- servers/slapd/back-bdb/add.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-bdb/add.c b/servers/slapd/back-bdb/add.c index 19a74e644c..e18feb33eb 100644 --- a/servers/slapd/back-bdb/add.c +++ b/servers/slapd/back-bdb/add.c @@ -209,7 +209,8 @@ retry: /* transaction retry */ rs->sr_ref = is_entry_referral( p ) ? get_entry_referrals( op, p ) : NULL; - bdb_unlocked_cache_return_entry_r( bdb, p ); + if ( p != (Entry *)&slap_entry_root ) + bdb_unlocked_cache_return_entry_r( bdb, p ); p = NULL; Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_add) ": parent " @@ -230,7 +231,8 @@ retry: /* transaction retry */ goto retry; } - bdb_unlocked_cache_return_entry_r( bdb, p ); + if ( p != (Entry *)&slap_entry_root ) + bdb_unlocked_cache_return_entry_r( bdb, p ); p = NULL; Debug( LDAP_DEBUG_TRACE, -- 2.39.5