From: Pierangelo Masarati Date: Wed, 2 Jan 2008 17:30:40 +0000 (+0000) Subject: fix to ITS#5304 X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~258 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=859c6d03c0be11f69ac12b9615500d6de5cc242b;p=openldap fix to ITS#5304 --- diff --git a/libraries/libldap/extended.c b/libraries/libldap/extended.c index 5a6efda9f1..1a2fc2a65a 100644 --- a/libraries/libldap/extended.c +++ b/libraries/libldap/extended.c @@ -291,7 +291,6 @@ ldap_parse_intermediate ( int freeit ) { BerElement *ber; - ber_tag_t rc; ber_tag_t tag; ber_len_t len; struct berval *resdata; @@ -324,9 +323,9 @@ ldap_parse_intermediate ( return ld->ld_errno; } - rc = ber_scanf( ber, "{" /*}*/ ); + tag = ber_scanf( ber, "{" /*}*/ ); - if( rc == LBER_ERROR ) { + if( tag == LBER_ERROR ) { ld->ld_errno = LDAP_DECODING_ERROR; ber_free( ber, 0 ); return ld->ld_errno; @@ -367,16 +366,16 @@ ldap_parse_intermediate ( } if ( serverctrls == NULL ) { - rc = LDAP_SUCCESS; + ld->ld_errno = LDAP_SUCCESS; goto free_and_return; } if ( ber_scanf( ber, /*{*/ "}" ) == LBER_ERROR ) { - rc = LDAP_DECODING_ERROR; + ld->ld_errno = LDAP_DECODING_ERROR; goto free_and_return; } - rc = ldap_pvt_get_controls( ber, serverctrls ); + ld->ld_errno = ldap_pvt_get_controls( ber, serverctrls ); free_and_return: ber_free( ber, 0 ); @@ -397,6 +396,6 @@ free_and_return: ldap_msgfree( res ); } - return LDAP_SUCCESS; + return ld->ld_errno; }