From: Howard Chu Date: Thu, 21 Jul 2005 21:59:35 +0000 (+0000) Subject: Plug memleak in enum_tree X-Git-Tag: OPENLDAP_AC_BP~279 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a70c294359984a63cf8339f897ff0ff649944f35;p=openldap Plug memleak in enum_tree --- diff --git a/servers/slapd/back-ldif/ldif.c b/servers/slapd/back-ldif/ldif.c index 6c2890a838..fa5ee9b031 100644 --- a/servers/slapd/back-ldif/ldif.c +++ b/servers/slapd/back-ldif/ldif.c @@ -466,11 +466,14 @@ enum_tree( struct ldif_info *ni = (struct ldif_info *) ck->op->o_bd->be_private; struct berval path; struct berval pdn, pndn; + int rc; dnParent( &ck->op->o_req_dn, &pdn ); dnParent( &ck->op->o_req_ndn, &pndn ); dn2path( &ck->op->o_req_ndn, &ck->op->o_bd->be_nsuffix[0], &ni->li_base_path, &path); - return r_enum_tree(ck, &path, &pdn, &pndn); + rc = r_enum_tree(ck, &path, &pdn, &pndn); + ch_free( path.bv_val ); + return rc; } /* Get the parent path plus the LDIF suffix */