From: Hallvard Furuseth Date: Sat, 10 Dec 2016 08:16:17 +0000 (+0100) Subject: ITS#8542 mdb_dbi_open(): Protect mainDB cursors X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e1be73c771e3ac8dfc7528c0825c56eb8ed295a6;p=openldap ITS#8542 mdb_dbi_open(): Protect mainDB cursors --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 27e63ee5ad..7974261437 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -10515,7 +10515,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; }