From f1a18f4e530062389834a216074b3c343bb25f56 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 14 Oct 2010 03:11:26 +0000 Subject: [PATCH] Cleanup prev commit --- libraries/libldap/cyrus.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index a223d4d419..4420bd03c1 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -395,7 +395,7 @@ ldap_int_sasl_bind( sasl_ssf_t *ssf; sasl_conn_t *ctx; sasl_interact_t *prompts = NULL; - struct berval ccred; + struct berval ccred = BER_BVNULL; int saslrc, rc; unsigned credlen; @@ -504,8 +504,6 @@ ldap_int_sasl_bind( sasl_setprop( ctx, SASL_SEC_PROPS, &ld->ld_options.ldo_sasl_secprops ); - ccred.bv_val = NULL; - ccred.bv_len = 0; mech = NULL; do { @@ -521,6 +519,7 @@ ldap_int_sasl_bind( if( pmech == NULL && mech != NULL ) { pmech = mech; + *rmech = mech; if( flags != LDAP_SASL_QUIET ) { fprintf(stderr, @@ -536,7 +535,6 @@ ldap_int_sasl_bind( if( res != LDAP_SUCCESS ) break; } - *rmech = mech; } while ( saslrc == SASL_INTERACT ); } else {