From: Kurt Zeilenga Date: Fri, 31 Mar 2006 21:03:51 +0000 (+0000) Subject: don't call cache_return_entry_rw with e of NULL X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~77 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=28191d764242345044deb99f95de4dbd9923c82a;p=openldap don't call cache_return_entry_rw with e of NULL --- 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 );