From: Ondřej Kuzník Date: Wed, 2 Oct 2024 12:23:44 +0000 (+0100) Subject: ITS#10264 Free NoD data we stored locally X-Git-Tag: OPENLDAP_REL_ENG_2_5_19~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39c97c8ad02d30e4f4085b25185a839b283c8a19;p=thirdparty%2Fopenldap.git ITS#10264 Free NoD data we stored locally --- diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index 95dba93902..e80b681045 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -898,6 +898,13 @@ nextresp2: if ( lr != &dummy_lr ) { ldap_return_request( ld, lr, 1 ); + } else { + if ( lr->lr_res_matched ) { + LDAP_FREE( lr->lr_res_matched ); + } + if ( lr->lr_res_error ) { + LDAP_FREE( lr->lr_res_error ); + } } lr = NULL; }