]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/cyrus.c
Don't copy and leak user; it's an env var so just use it directly.
[openldap] / libraries / libldap / cyrus.c
index 20589a5a6a274cf1891fb057acecd5e1be9bac33..d262410e33dd55af97eefb49fba857fe8f58b3a1 100644 (file)
@@ -419,6 +419,7 @@ ldap_int_sasl_open(
 
        rc = sasl_client_new( "ldap", host, session_callbacks,
                SASL_SECURITY_LAYER, &ctx );
+       ber_memfree( session_callbacks );
 
        if ( rc != SASL_OK ) {
                ld->ld_errno = sasl_err2ldap( rc );
@@ -663,6 +664,7 @@ ldap_int_sasl_bind(
 int
 ldap_int_sasl_external(
        LDAP *ld,
+       LDAPConn *conn,
        const char * authid,
        ber_len_t ssf )
 {
@@ -670,11 +672,7 @@ ldap_int_sasl_external(
        sasl_conn_t *ctx;
        sasl_external_properties_t extprops;
 
-       if( ld->ld_defconn == NULL ) {
-               return LDAP_LOCAL_ERROR;
-       }
-
-       ctx = ld->ld_defconn->lconn_sasl_ctx;
+       ctx = conn->lconn_sasl_ctx;
 
        if ( ctx == NULL ) {
                return LDAP_LOCAL_ERROR;
@@ -1005,6 +1003,7 @@ ldap_int_sasl_bind(
 int
 ldap_int_sasl_external(
        LDAP *ld,
+       LDAPConn *conn,
        const char * authid,
        ber_len_t ssf )
 { return LDAP_SUCCESS; }