&credlen,
&mech );
+ /* Cyrus SASL library doesn't initialize the prompt result pointer */
if( promptresult == NULL && prompts != NULL ) prompts->result = NULL;
if( pmech == NULL && mech != NULL ) {
int res;
if( !interact ) break;
res = (interact)( ld, flags, defaults, prompts );
+
+ /* keep a pointer to the prompt result so we can free it
+ * after Cyrus SASL has consumed the prompts.
+ */
promptresult = prompts->result;
+
if( res != LDAP_SUCCESS ) break;
}
} while ( saslrc == SASL_INTERACT );
(SASL_CONST char **)&ccred.bv_val,
&credlen );
+ /* SASL library doesn't initialize the prompt result pointer */
if( promptresult == NULL && prompts != NULL ) prompts->result = NULL;
#ifdef NEW_LOGGING
int res;
if( !interact ) break;
res = (interact)( ld, flags, defaults, prompts );
+
+ /* keep a pointer to the prompt result so we can free it
+ * after Cyrus SASL has consumed the prompts.
+ */
promptresult = prompts->result;
+
if( res != LDAP_SUCCESS ) break;
}
} while ( saslrc == SASL_INTERACT );
}
done:
+ /* free the last prompt result */
LDAP_FREE((void*)promptresult);
return rc;
}