]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/add.c
Converted all use of dn_parent to the in-place version. (Fixed a pdn leak
[openldap] / servers / slapd / back-ldbm / add.c
index ab9b53dede9bde62ad0176c5e1ffbf35d98ef866..1a8424f53d0cf709ab99496ce9e980314289c31c 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,7 +202,6 @@ ldbm_back_add(
        } else {
                if(pdn != NULL) {
                        assert( *pdn == '\0' );
-                       free(pdn);
                }
 
                /* no parent, must be adding entry to root */