]> git.sur5r.net Git - openldap/commitdiff
Don't strdup conn->authz into op, just reference directly. (Conn cannot
authorHoward Chu <hyc@openldap.org>
Wed, 7 Aug 2002 05:19:55 +0000 (05:19 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 7 Aug 2002 05:19:55 +0000 (05:19 +0000)
be freed until after all associated ops are freed.)

servers/slapd/connection.c
servers/slapd/operation.c

index 8570a4a16322c33c1abb63edf8825240c7c97072..71719a880f1829e51259034b422cef5049597b71 100644 (file)
@@ -1555,13 +1555,11 @@ 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.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_dn = conn->c_dn;
+           arg->co_op->o_ndn = conn->c_ndn;
        }
        arg->co_op->o_authtype = conn->c_authtype;
-       ber_dupbv( &arg->co_op->o_authmech, &conn->c_authmech );
+       arg->co_op->o_authmech = conn->c_authmech;
        
        if (!arg->co_op->o_protocol) {
            arg->co_op->o_protocol = conn->c_protocol
index 49c1a7b58c50815c7506a5fef15d79119f1d3c93..70343c6f40cf4a200a44e2020028acf79e67c3d0 100644 (file)
@@ -23,15 +23,6 @@ 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 );
        }