From: Kurt Zeilenga Date: Fri, 16 Jun 2000 20:00:21 +0000 (+0000) Subject: Memory leak in referral code (ITS#596) X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2607 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ae61f3dcaff713338e2138ab7c5b93bf17d06d18;p=openldap Memory leak in referral code (ITS#596) Apply patch from Steve Sonntag --- diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index 475effc9d5..6fa1ef19fe 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -464,6 +464,15 @@ try_read1msg( } } } + + if( lr->lr_res_matched != NULL ) { + LDAP_FREE( lr->lr_res_matched ); + lr->lr_res_matched = NULL; + } + if( lr->lr_res_error != NULL ) { + LDAP_FREE( lr->lr_res_error ); + lr->lr_res_error = NULL; + } } } }