X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-mdb%2Fdn2entry.c;h=230207de6084d992367b9c6c702c4e01ebaae664;hb=d4097bb42783cb63ba54be8dcf288247ff825de3;hp=16c50877ddf45c1b20dd116f2716971cdf0cfe3e;hpb=64b164b4fc1c6227b90e9496cbacbfeba8a43914;p=openldap diff --git a/servers/slapd/back-mdb/dn2entry.c b/servers/slapd/back-mdb/dn2entry.c index 16c50877dd..230207de60 100644 --- a/servers/slapd/back-mdb/dn2entry.c +++ b/servers/slapd/back-mdb/dn2entry.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2000-2012 The OpenLDAP Foundation. + * Copyright 2000-2014 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,6 +34,7 @@ mdb_dn2entry( MDB_cursor *m2, struct berval *dn, Entry **e, + ID *nsubs, int matched ) { struct mdb_info *mdb = (struct mdb_info *) op->o_bd->be_private; @@ -47,7 +48,7 @@ mdb_dn2entry( *e = NULL; - rc = mdb_dn2id( op, tid, m2, dn, &id, &mbv, &nmbv ); + rc = mdb_dn2id( op, tid, m2, dn, &id, nsubs, &mbv, &nmbv ); if ( rc ) { if ( matched ) { rc2 = mdb_cursor_open( tid, mdb->mi_id2entry, &mc ); @@ -70,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;