https://bugs.openldap.org/show_bug.cgi?id=9297
--- Comment #2 from Konstantin Andreev grapvar@gmail.com --- (In reply to Howard Chu from comment #1)
What other return codes do you see mdb_dn2id returning?
mdb_dn2id() blindly passes mdb_cursor_get() return value to a caller.
I discovered the defect during investigation of interaction in this call chain:
mdb_add <-> mdb_dn2entry <-> mdb_dn2id <-> ...,
so, if you are asking for a test case that triggers leak, I did not care to build it.