https://bugs.openldap.org/show_bug.cgi?id=9297
--- Comment #4 from Konstantin Andreev grapvar@gmail.com --- (In reply to Howard Chu from comment #3)
So again I repeat myself - what other return codes do you see?
What you are asking for is a proof that defect hits the leak.
So I should investigate LMDB sources, develop the test that causes mdb_cursor_get() to return something other than 0 or MDB_NOTFOUND, and, finally, to trigger a leak in mdb_add/mdb_search <-> mdb_dn2entry interaction.
Given that you have officially documented that mdb_cursor_get() returns undocumented error conditions.
To convince you to add plain [rc == MDB_NOTFOUND] check into mdb_dn2entry().
Certainly, I won't do this. Too much work for too low outcome.