From a70c294359984a63cf8339f897ff0ff649944f35 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 21 Jul 2005 21:59:35 +0000 Subject: [PATCH] Plug memleak in enum_tree --- servers/slapd/back-ldif/ldif.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 */ -- 2.39.5