From: Howard Chu Date: Sun, 6 Apr 2003 01:03:43 +0000 (+0000) Subject: ITS#2423 free SASL prompts X-Git-Tag: AUTOCONF_2_57~53 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=103f70c3bf1d5a31c0eadd041ca2efbb55209771;p=openldap ITS#2423 free SASL prompts --- diff --git a/servers/slurpd/ldap_op.c b/servers/slurpd/ldap_op.c index a39df976f0..1a0ba704a5 100644 --- a/servers/slurpd/ldap_op.c +++ b/servers/slurpd/ldap_op.c @@ -942,13 +942,14 @@ retry: } { - char *passwd = ri->ri_password ? ber_strdup( ri->ri_password ) : NULL; void *defaults = lutil_sasl_defaults( ri->ri_ldp, ri->ri_saslmech, - ri->ri_realm, ri->ri_authcId, passwd, ri->ri_authzId ); + ri->ri_realm, ri->ri_authcId, ri->ri_password, ri->ri_authzId ); ldrc = ldap_sasl_interactive_bind_s( ri->ri_ldp, ri->ri_bind_dn, ri->ri_saslmech, NULL, NULL, LDAP_SASL_QUIET, lutil_sasl_interact, defaults ); + + lutil_sasl_freedefs( defaults ); if ( ldrc != LDAP_SUCCESS ) { #ifdef NEW_LOGGING LDAP_LOG ( OPERATION, ERR, "do_bind: " @@ -963,9 +964,6 @@ retry: ri->ri_ldp = NULL; return( BIND_ERR_SASL_FAILED ); } - - ber_memfree( passwd ); - ber_memfree( defaults ); } break; #else