From: Kurt Zeilenga Date: Mon, 14 Aug 2000 18:39:43 +0000 (+0000) Subject: Fix a minor leak. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2255 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f22250baaa2baf817a4092b06269cb25b2499979;p=openldap Fix a minor leak. --- diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index 0320f7bbc8..c63bc37da7 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -555,6 +555,13 @@ ldap_int_sasl_bind( } if ( rc != LDAP_SUCCESS && rc != LDAP_SASL_BIND_IN_PROGRESS ) { + if( scred ) { + /* and server provided us with data? */ + Debug( LDAP_DEBUG_TRACE, + "ldap_int_sasl_bind: rc=%d sasl=%d len=%ld\n", + rc, saslrc, scred->bv_len ); + ber_bvfree( scred ); + } return ld->ld_errno; } @@ -609,8 +616,6 @@ ldap_int_sasl_bind( return ld->ld_errno = sasl_err2ldap( saslrc ); } - /* likely should add a quiet option */ - if( flags != LDAP_SASL_QUIET ) { saslrc = sasl_getprop( ctx, SASL_USERNAME, (void **) &data ); if( saslrc == SASL_OK && data && *data ) {