From: Howard Chu Date: Tue, 3 Mar 2009 17:57:24 +0000 (+0000) Subject: ITS#5980 clear res_matched after successfully chasing referral X-Git-Tag: ACLCHECK_0~762 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bd312123d6f63eba9eca08b5c0b2e0ce31ce8e6d;p=openldap ITS#5980 clear res_matched after successfully chasing referral --- diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index ad62a02d30..afdc236ea7 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -845,6 +845,10 @@ nextresp2: return( -1 ); /* fatal error */ } lr->lr_res_errno = LDAP_SUCCESS; /* sucessfully chased referral */ + if ( lr->lr_res_matched ) { + LDAP_FREE( lr->lr_res_matched ); + lr->lr_res_matched = NULL; + } } else { if ( lr->lr_outrefcnt <= 0 && lr->lr_parent == NULL ) {