From: Howard Chu Date: Mon, 11 Aug 2014 18:00:11 +0000 (-0700) Subject: ITS#7917 fix mdb_dbi_open X-Git-Tag: OPENLDAP_REL_ENG_2_4_40~53^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=322cd26a7bc92fecb92ce92aa49ac5b342ebde50;p=openldap ITS#7917 fix mdb_dbi_open Don't let dummy go out of scope --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 6a95f31d50..47a503636c 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -8892,6 +8892,7 @@ int mdb_dbi_open(MDB_txn *txn, const char *name, unsigned int flags, MDB_dbi *db MDB_val key, data; MDB_dbi i; MDB_cursor mc; + MDB_db dummy; int rc, dbflag, exact; unsigned int unused = 0, seq; size_t len; @@ -8961,7 +8962,6 @@ int mdb_dbi_open(MDB_txn *txn, const char *name, unsigned int flags, MDB_dbi *db return MDB_INCOMPATIBLE; } else if (rc == MDB_NOTFOUND && (flags & MDB_CREATE)) { /* Create if requested */ - MDB_db dummy; data.mv_size = sizeof(MDB_db); data.mv_data = &dummy; memset(&dummy, 0, sizeof(dummy));