]> git.sur5r.net Git - openldap/commitdiff
ITS#8542 mdb_dbi_open(): Protect mainDB cursors
authorHallvard Furuseth <hallvard@openldap.org>
Sat, 10 Dec 2016 08:16:17 +0000 (09:16 +0100)
committerHallvard Furuseth <hallvard@openldap.org>
Sat, 10 Dec 2016 08:16:17 +0000 (09:16 +0100)
libraries/liblmdb/mdb.c

index 27e63ee5adc41877b62e21316dab01c6cec66065..7974261437a64afc35d92ec01c70390b4f643606 100644 (file)
@@ -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;
        }