]> git.sur5r.net Git - openldap/commitdiff
More for prev
authorHoward Chu <hyc@openldap.org>
Mon, 2 Mar 2009 07:57:18 +0000 (07:57 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 2 Mar 2009 07:57:18 +0000 (07:57 +0000)
servers/slapd/back-bdb/add.c

index 19a74e644cdf6c2ab06b0efd2fcf6248b13e31a1..e18feb33eb3745b2361799e5cba70e6e53e9f982 100644 (file)
@@ -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,