From: Leo Yuriev Date: Tue, 14 Oct 2014 10:49:25 +0000 (+0400) Subject: ITS#7965 mdb_dn2id X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=11601c12deaeed8a1ed40a3fa9de2a4be3dd5ae8;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;