From 28191d764242345044deb99f95de4dbd9923c82a Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 31 Mar 2006 21:03:51 +0000 Subject: [PATCH] don't call cache_return_entry_rw with e of NULL --- servers/slapd/back-ldbm/modify.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/servers/slapd/back-ldbm/modify.c b/servers/slapd/back-ldbm/modify.c index 9625682841..18557bf624 100644 --- a/servers/slapd/back-ldbm/modify.c +++ b/servers/slapd/back-ldbm/modify.c @@ -259,7 +259,7 @@ ldbm_back_modify( cache_return_entry_r( &li->li_cache, matched ); } else { rs->sr_ref = referral_rewrite( default_referral, NULL, - &op->o_req_dn, LDAP_SCOPE_DEFAULT ); + &op->o_req_dn, LDAP_SCOPE_DEFAULT ); } rs->sr_err = LDAP_REFERRAL; @@ -267,8 +267,7 @@ ldbm_back_modify( goto return_results; } - if ( !manageDSAit && is_entry_referral( e ) ) - { + if ( !manageDSAit && is_entry_referral( e ) ) { /* parent is a referral, don't allow add */ /* parent is an alias, don't allow add */ rs->sr_ref = get_entry_referrals( op, e ); @@ -295,7 +294,7 @@ ldbm_back_modify( } return_results:; - cache_return_entry_w( &li->li_cache, e ); + if( e != NULL ) cache_return_entry_w( &li->li_cache, e ); ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock); send_ldap_result( op, rs ); -- 2.39.5