}
if ( ! access_allowed( be, conn, op, p,
- children, NULL, ACL_WRITE ) )
+ children, NULL, ACL_WRITE, NULL ) )
{
/* free parent and writer lock */
cache_return_entry_w( &li->li_cache, p );
p = (Entry *)&slap_entry_root;
rc = access_allowed( be, conn, op, p,
- children, NULL, ACL_WRITE );
+ children, NULL, ACL_WRITE, NULL );
p = NULL;
if ( ! rc ) {
}
if ( rc ) {
- /* in case of error, writer lock is freed
- * and entry's private data is destroyed */
+ /*
+ * in case of error, writer lock is freed
+ * and entry's private data is destroyed.
+ * otherwise, this is done when entry is released
+ */
cache_return_entry_w( &li->li_cache, e );
+ ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
}
- ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
-
return( rc );
}