]> git.sur5r.net Git - openldap/commitdiff
Plug memleak in enum_tree
authorHoward Chu <hyc@openldap.org>
Thu, 21 Jul 2005 21:59:35 +0000 (21:59 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 21 Jul 2005 21:59:35 +0000 (21:59 +0000)
servers/slapd/back-ldif/ldif.c

index 6c2890a838fb9bafb9787bdddd61293141c032eb..fa5ee9b0315d65d66165cd6bfe52ff5b732cfac2 100644 (file)
@@ -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 */