]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/add.c
modify be_referral to use struct berval DNs.
[openldap] / servers / slapd / back-ldbm / add.c
index ab9b53dede9bde62ad0176c5e1ffbf35d98ef866..1b86663a2388e25055db7700ecbe4d19ff32f608 100644 (file)
@@ -123,15 +123,12 @@ ldbm_back_add(
                        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 ) )
                {
@@ -205,13 +202,11 @@ ldbm_back_add(
        } 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 ) ) {
+               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,