]> git.sur5r.net Git - openldap/commitdiff
Duplicate error messages to be returned
authorKurt Zeilenga <kurt@openldap.org>
Sun, 25 May 2003 01:10:36 +0000 (01:10 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 25 May 2003 01:10:36 +0000 (01:10 +0000)
libraries/libldap/cyrus.c

index 742d13641716b74995e547578423034d5f558fe2..686ff76ad2d248dbc34643a3650099cb49e00132 100644 (file)
@@ -613,7 +613,7 @@ ldap_int_sasl_bind(
        if ( (saslrc != SASL_OK) && (saslrc != SASL_CONTINUE) ) {
                rc = ld->ld_errno = sasl_err2ldap( saslrc );
 #if SASL_VERSION_MAJOR >= 2
-               ld->ld_error = (char *)sasl_errdetail( ctx );
+               ld->ld_error = LDAP_STRDUP( sasl_errdetail( ctx ) );
 #endif
                goto done;
        }
@@ -701,7 +701,7 @@ ldap_int_sasl_bind(
                if ( (saslrc != SASL_OK) && (saslrc != SASL_CONTINUE) ) {
                        ld->ld_errno = sasl_err2ldap( saslrc );
 #if SASL_VERSION_MAJOR >= 2
-                       ld->ld_error = (char *)sasl_errdetail( ctx );
+                       ld->ld_error = LDAP_STRDUP( sasl_errdetail( ctx ) );
 #endif
                        rc = ld->ld_errno;
                        goto done;
@@ -712,7 +712,7 @@ ldap_int_sasl_bind(
 
        if ( saslrc != SASL_OK ) {
 #if SASL_VERSION_MAJOR >= 2
-               ld->ld_error = (char *)sasl_errdetail( ctx );
+               ld->ld_error = LDAP_STRDUP( sasl_errdetail( ctx ) );
 #endif
                rc = ld->ld_errno = sasl_err2ldap( saslrc );
                goto done;