From: Hallvard Furuseth Date: Tue, 13 Dec 2016 23:23:01 +0000 (+0100) Subject: ITS#8542 mdb_dbi_open(): Protect mainDB cursors X-Git-Tag: LMDB_0.9.19~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e8e8293359834e9243f440030e368f287f12db33;p=openldap ITS#8542 mdb_dbi_open(): Protect mainDB cursors --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index f059fd6f5d..32349dffe9 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -9724,7 +9724,8 @@ int mdb_dbi_open(MDB_txn *txn, const char *name, unsigned int flags, MDB_dbi *db memset(&dummy, 0, sizeof(dummy)); dummy.md_root = P_INVALID; dummy.md_flags = flags & PERSISTENT_FLAGS; - rc = mdb_cursor_put(&mc, &key, &data, F_SUBDATA); + WITH_CURSOR_TRACKING(mc, + rc = mdb_cursor_put(&mc, &key, &data, F_SUBDATA)); dbflag |= DB_DIRTY; }