https://bugs.openldap.org/show_bug.cgi?id=9876
--- Comment #1 from Howard Chu hyc@openldap.org --- Thanks for the report.
The lock issues are all false positives. Each case where a function returns with a lock held, that is the intended behavior. Etc...
Some of the leaks may be legit. We've tended to ignore the ones in the client tools since they're one-shot programs, and immediately exit anyway. Feel free to submit patches for those if they bother you, I don't think they're worth the trouble.
I'll fix the library leaks.