]> git.sur5r.net Git - openldap/commitdiff
use realloc
authorPierangelo Masarati <ando@openldap.org>
Mon, 21 Jun 2010 20:24:20 +0000 (20:24 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 21 Jun 2010 20:24:20 +0000 (20:24 +0000)
servers/slapd/controls.c

index 5cdfaf0051da64ab2a0f256dbacd9b00fe5c15f5..8467ff8536ddf8fb821bc1e2b16798ecf69c04f4 100644 (file)
@@ -1137,14 +1137,13 @@ static int parseProxyAuthz (
        }
 
        ch_free( op->o_ndn.bv_val );
-       ch_free( op->o_dn.bv_val );
 
        /*
         * NOTE: since slap_sasl_getdn() returns a normalized dn,
         * from now on op->o_dn is normalized
         */
        op->o_ndn = dn;
-       ber_dupbv( &op->o_dn, &dn );
+       ber_bvreplace( &op->o_dn, &dn );
 
        Statslog( LDAP_DEBUG_STATS, "%s PROXYAUTHZ dn=\"%s\"\n",
            op->o_log_prefix, dn.bv_val, 0, 0, 0 );