]> git.sur5r.net Git - openldap/commitdiff
ITS#7872 plug memleak of matchedDN
authorHoward Chu <hyc@openldap.org>
Wed, 4 Jun 2014 21:02:06 +0000 (14:02 -0700)
committerHoward Chu <hyc@openldap.org>
Wed, 4 Jun 2014 21:02:06 +0000 (14:02 -0700)
servers/slapd/back-mdb/dn2entry.c

index 77263796394a04fb684e6b2cb4dd04475eb01104..230207de6084d992367b9c6c702c4e01ebaae664 100644 (file)
@@ -71,6 +71,8 @@ mdb_dn2entry(
                        ber_dupbv_x( &(*e)->e_nname, dn, op->o_tmpmemctx );
                else
                        ber_dupbv_x( &(*e)->e_nname, &nmbv, op->o_tmpmemctx );
+       } else {
+               op->o_tmpfree( mbv.bv_val, op->o_tmpmemctx );
        }
 
        return rc;