]> git.sur5r.net Git - openldap/commitdiff
ITS#2548 must dup sasl_errdetail msgs
authorHoward Chu <hyc@openldap.org>
Sat, 24 May 2003 01:05:11 +0000 (01:05 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 24 May 2003 01:05:11 +0000 (01:05 +0000)
libraries/libldap/cyrus.c

index 7ad2b80e66889660b67d0c00081addf4a9d854d1..bf4d839e4420bf27e4bd2477b4604f77fab48044 100644 (file)
@@ -665,7 +665,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;
        }
@@ -753,7 +753,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;
@@ -764,7 +764,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;