From b0e46fb9f9b6cad039576e503a520be9bd679197 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Tue, 14 Oct 2014 14:49:25 +0400 Subject: [PATCH] ITS#7965 mdb_dn2id heap corruption due to returning a reference to a local variable --- servers/slapd/back-mdb/dn2id.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5