mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 17:19:43 -05:00
according to sasl documentation, prompts is filled only if SASL_INTERACT is returned
This commit is contained in:
parent
f8a1007994
commit
6c32533d02
1 changed files with 11 additions and 8 deletions
|
|
@ -599,16 +599,19 @@ ldap_int_sasl_bind(
|
|||
}
|
||||
}
|
||||
|
||||
#if SASL_VERSION_MAJOR >= 2
|
||||
/* XXX the application should free interact results. */
|
||||
if ( prompts != NULL && prompts->result != NULL ) {
|
||||
LDAP_FREE( (void *)prompts->result );
|
||||
prompts->result = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
if( saslrc == SASL_INTERACT ) {
|
||||
int res;
|
||||
|
||||
#if SASL_VERSION_MAJOR >= 2
|
||||
/* XXX the application should free interact results.
|
||||
* FIXME: this should happen only
|
||||
* if saslrc == SASL_INTERACT */
|
||||
if ( prompts != NULL && prompts->result != NULL ) {
|
||||
LDAP_FREE( (void *)prompts->result );
|
||||
prompts->result = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
if( !interact ) break;
|
||||
res = (interact)( ld, flags, defaults, prompts );
|
||||
if( res != LDAP_SUCCESS ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue