ber_bvecfree( refs );
free( matched_dn );
- free( pdn );
return -1;
}
/* don't need the add lock anymore */
ldap_pvt_thread_mutex_unlock(&li->li_add_mutex);
- free(pdn);
-
if ( ! access_allowed( be, conn, op, p,
children, NULL, ACL_WRITE ) )
{
} else {
if(pdn != NULL) {
assert( *pdn == '\0' );
- free(pdn);
}
/* no parent, must be adding entry to root */
- if ( !be_isroot( be, op->o_ndn ) ) {
- if ( be_issuffix( be, "" )
- || be_isupdate( be, op->o_ndn ) ) {
- static const Entry rootp = { NOID, "", "", NULL, NULL };
- p = (Entry *)&rootp;
+ if ( !be_isroot( be, &op->o_ndn ) ) {
+ if ( be_issuffix( be, "" ) || be_isupdate( be, &op->o_ndn ) ) {
+ p = (Entry *)&slap_entry_root;
rc = access_allowed( be, conn, op, p,
children, NULL, ACL_WRITE );