/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2007 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
}
- ldap_pvt_thread_rdwr_runlock(&li->li_giant_rwlock);
-
rs->sr_err = LDAP_REFERRAL;
goto return_results;
}
}
return_results:;
- cache_return_entry_r( &li->li_cache, e );
+ if ( e ) cache_return_entry_r( &li->li_cache, e );
ldap_pvt_thread_rdwr_runlock(&li->li_giant_rwlock);
send_ldap_result( op, rs );