From 322cd26a7bc92fecb92ce92aa49ac5b342ebde50 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 11 Aug 2014 11:00:11 -0700 Subject: [PATCH] ITS#7917 fix mdb_dbi_open Don't let dummy go out of scope --- libraries/liblmdb/mdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 6a95f31..47a5036 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));