projects
/
platform
/
upstream
/
lmdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ada2630
)
ITS#7917 fix mdb_dbi_open
author
Howard Chu
<hyc@symas.com>
Mon, 11 Aug 2014 18:00:11 +0000
(11:00 -0700)
committer
Howard Chu
<hyc@symas.com>
Mon, 11 Aug 2014 18:00:11 +0000
(11:00 -0700)
Don't let dummy go out of scope
libraries/liblmdb/mdb.c
patch
|
blob
|
history
diff --git
a/libraries/liblmdb/mdb.c
b/libraries/liblmdb/mdb.c
index
6a95f31
..
47a5036
100644
(file)
--- 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));