X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fsasl.c;h=fc995bee449dee8acf63378e509fc3bedc3222bc;hb=7d13ef7e42f1514dd99878835a13a700da4f4b69;hp=61ae706b1066852e362f3039db2018493c5a7625;hpb=fca72f333b50ea7ca06a697d3fac517f6e64aced;p=openldap diff --git a/libraries/libldap/sasl.c b/libraries/libldap/sasl.c index 61ae706b10..fc995bee44 100644 --- a/libraries/libldap/sasl.c +++ b/libraries/libldap/sasl.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2010 The OpenLDAP Foundation. + * Copyright 1998-2012 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -451,20 +451,23 @@ ldap_sasl_interactive_bind( #endif if( mechs == NULL || *mechs == '\0' ) { + /* FIXME: this needs to be asynchronous too; + * perhaps NULL should be disallowed for async usage? + */ rc = ldap_pvt_sasl_getmechs( ld, &smechs ); if( rc != LDAP_SUCCESS ) { goto done; } Debug( LDAP_DEBUG_TRACE, - "ldap_sasl_interactive_bind_s: server supports: %s\n", + "ldap_sasl_interactive_bind: server supports: %s\n", smechs, 0, 0 ); mechs = smechs; } else { Debug( LDAP_DEBUG_TRACE, - "ldap_sasl_interactive_bind_s: user selected: %s\n", + "ldap_sasl_interactive_bind: user selected: %s\n", mechs, 0, 0 ); } } @@ -509,6 +512,8 @@ ldap_sasl_interactive_bind_s( serverControls, clientControls, flags, interact, defaults, result, &rmech, &msgid ); + ldap_msgfree( result ); + if ( rc != LDAP_SASL_BIND_IN_PROGRESS ) break;