From: Howard Chu Date: Sat, 24 May 2003 01:05:11 +0000 (+0000) Subject: ITS#2548 must dup sasl_errdetail msgs X-Git-Tag: OPENLDAP_REL_ENG_2_2_0ALPHA~57 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d44977287585efae33d1c34ced49ee60811bf927;p=openldap ITS#2548 must dup sasl_errdetail msgs --- diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index 7ad2b80e66..bf4d839e44 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -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;