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;
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 );
}
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 );