From: Kurt Zeilenga Date: Thu, 11 May 2000 01:40:02 +0000 (+0000) Subject: Fix cred passing. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~3017 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0d6e1a4cbe1c7e50811d4feb84f03efa8c943eac;p=openldap Fix cred passing. --- diff --git a/libraries/libldap/sasl.c b/libraries/libldap/sasl.c index 062d10e383..b95c24bb04 100644 --- a/libraries/libldap/sasl.c +++ b/libraries/libldap/sasl.c @@ -198,12 +198,14 @@ ldap_sasl_bind_s( rc = ldap_result2error( ld, result, 1 ); - if ( rc != LDAP_SUCCESS && rc != LDAP_SASL_BIND_IN_PROGRESS ) { + if ( rc == LDAP_SUCCESS || rc == LDAP_SASL_BIND_IN_PROGRESS ) { if( servercredp != NULL ) { *servercredp = scredp; + scredp = NULL; } + } - } else if (scredp != NULL ) { + if ( scredp != NULL ) { ber_bvfree(scredp); }