From: Howard Chu Date: Wed, 7 Aug 2002 06:37:11 +0000 (+0000) Subject: Revert previous commit X-Git-Tag: NO_SLAP_OP_BLOCKS~1264 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=50d490be6c54e81fbbe464ae1233660e90fff958;p=openldap Revert previous commit --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 71719a880f..8570a4a163 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -1555,11 +1555,13 @@ static int connection_op_activate( Connection *conn, Operation *op ) if (!arg->co_op->o_dn.bv_len) { arg->co_op->o_authz = conn->c_authz; - arg->co_op->o_dn = conn->c_dn; - arg->co_op->o_ndn = conn->c_ndn; + arg->co_op->o_dn.bv_val = ch_strdup( conn->c_dn.bv_val ? + conn->c_dn.bv_val : "" ); + arg->co_op->o_ndn.bv_val = ch_strdup( conn->c_ndn.bv_val ? + conn->c_ndn.bv_val : "" ); } arg->co_op->o_authtype = conn->c_authtype; - arg->co_op->o_authmech = conn->c_authmech; + ber_dupbv( &arg->co_op->o_authmech, &conn->c_authmech ); if (!arg->co_op->o_protocol) { arg->co_op->o_protocol = conn->c_protocol diff --git a/servers/slapd/operation.c b/servers/slapd/operation.c index 70343c6f40..49c1a7b58c 100644 --- a/servers/slapd/operation.c +++ b/servers/slapd/operation.c @@ -23,6 +23,15 @@ slap_op_free( Operation *op ) if ( op->o_ber != NULL ) { ber_free( op->o_ber, 1 ); } + if ( op->o_dn.bv_val != NULL ) { + free( op->o_dn.bv_val ); + } + if ( op->o_ndn.bv_val != NULL ) { + free( op->o_ndn.bv_val ); + } + if ( op->o_authmech.bv_val != NULL ) { + free( op->o_authmech.bv_val ); + } if ( op->o_ctrls != NULL ) { ldap_controls_free( op->o_ctrls ); }