https://bugs.openldap.org/show_bug.cgi?id=9297
--- Comment #3 from Howard Chu hyc@openldap.org --- (In reply to Konstantin Andreev from comment #2)
(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.
So again I repeat myself - what other return codes do you see?
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.