From: Leo Yuriev Date: Tue, 14 Oct 2014 10:49:25 +0000 (+0400) Subject: ITS#7965 mdb_dn2id X-Git-Tag: OPENLDAP_REL_ENG_2_4_41~198 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=07fa9247053d0dd99e7ca6aa53c355dc24fae3ff;p=openldap ITS#7965 mdb_dn2id heap corruption due to returning a reference to a local variable --- diff --git a/servers/slapd/back-mdb/dn2id.c b/servers/slapd/back-mdb/dn2id.c index 06e6ad3f92..41c4758f95 100644 --- a/servers/slapd/back-mdb/dn2id.c +++ b/servers/slapd/back-mdb/dn2id.c @@ -346,7 +346,7 @@ mdb_dn2id( cursor = mc; } else { rc = mdb_cursor_open( txn, dbi, &cursor ); - if ( rc ) return rc; + if ( rc ) goto done; } for (;;) { @@ -470,7 +470,7 @@ mdb_dn2sups( key.mv_size = sizeof(ID); rc = mdb_cursor_open( txn, dbi, &cursor ); - if ( rc ) return rc; + if ( rc ) goto done; for (;;) { key.mv_data = &pid;