X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fslapi%2Fslapi_ops.c;h=c830aa5075ebfd0a4d0d6dfc56d0cb156c4fe80c;hb=43ec05a45acf31098a461514a5ce04c176aa4994;hp=8f3a3433d097b036307770d82b238e00434d3043;hpb=48d1046a356a6eaf2803f447c2c3f07194d05116;p=openldap diff --git a/servers/slapd/slapi/slapi_ops.c b/servers/slapd/slapi/slapi_ops.c index 8f3a3433d0..c830aa5075 100644 --- a/servers/slapd/slapi/slapi_ops.c +++ b/servers/slapd/slapi/slapi_ops.c @@ -177,7 +177,7 @@ slapi_int_get_ctrls( Slapi_PBlock *pb ) } void -slapi_int_connection_init_pb( Slapi_PBlock *pb, ber_tag_t OpType ) +slapi_int_connection_init_pb( Slapi_PBlock *pb, ber_tag_t tag ) { Connection *conn; Operation *op; @@ -265,7 +265,7 @@ slapi_int_connection_init_pb( Slapi_PBlock *pb, ber_tag_t OpType ) conn->c_send_search_reference = slap_send_search_reference; /* operation object */ - op->o_tag = OpType; + op->o_tag = tag; op->o_protocol = LDAP_VERSION3; BER_BVZERO( &op->o_authmech ); op->o_time = slap_get_time(); @@ -354,6 +354,10 @@ slapi_int_connection_done_pb( Slapi_PBlock *pb ) break; } + slapi_ch_free_string( &conn->c_authmech.bv_val ); + slapi_ch_free_string( &conn->c_dn.bv_val ); + slapi_ch_free_string( &conn->c_ndn.bv_val ); + if ( conn->c_sb != NULL ) { ber_sockbuf_free( conn->c_sb ); } @@ -368,19 +372,21 @@ slapi_int_func_internal_pb( Slapi_PBlock *pb, slap_operation_t which ) { BI_op_bind **func; SlapReply *rs = &pb->rs; + int rc; PBLOCK_ASSERT_INTOP( pb, 0 ); - rs->sr_err = slapi_int_get_ctrls( pb ); - if ( rs->sr_err != LDAP_SUCCESS ) { - return rs->sr_err; + rc = slapi_int_get_ctrls( pb ); + if ( rc != LDAP_SUCCESS ) { + rs->sr_err = rc; + return rc; } func = &pb->pop->o_bd->be_bind; - rs->sr_err = func[which]( pb->pop, &pb->rs ); + rc = func[which]( pb->pop, &pb->rs ); - return rs->sr_err; + return rc; } int @@ -644,10 +650,10 @@ cleanup: pb->pop->ors_filter = NULL; } - slapi_pblock_set( pb, SLAPI_X_INTOP_RESULT_CALLBACK, NULL ); - slapi_pblock_set( pb, SLAPI_X_INTOP_SEARCH_ENTRY_CALLBACK, NULL ); - slapi_pblock_set( pb, SLAPI_X_INTOP_REFERRAL_ENTRY_CALLBACK, NULL ); - slapi_pblock_set( pb, SLAPI_X_INTOP_CALLBACK_DATA, NULL ); + slapi_pblock_delete_param( pb, SLAPI_X_INTOP_RESULT_CALLBACK ); + slapi_pblock_delete_param( pb, SLAPI_X_INTOP_SEARCH_ENTRY_CALLBACK ); + slapi_pblock_delete_param( pb, SLAPI_X_INTOP_REFERRAL_ENTRY_CALLBACK ); + slapi_pblock_delete_param( pb, SLAPI_X_INTOP_CALLBACK_DATA ); return 0; }