]> git.sur5r.net Git - openldap/commitdiff
Fix cred passing.
authorKurt Zeilenga <kurt@openldap.org>
Thu, 11 May 2000 01:40:02 +0000 (01:40 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 11 May 2000 01:40:02 +0000 (01:40 +0000)
libraries/libldap/sasl.c

index 062d10e3830ba6d26d7133b1eadf348ffbfb068a..b95c24bb04fa47c976389df27b3f36a69f869f0f 100644 (file)
@@ -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);
        }