https://bugs.openldap.org/show_bug.cgi?id=8113
--- Comment #2 from jscott@posteo.net --- This has been fixed. It's in my manpage on Debian Bullseye:
ldap_str2dn() parses a string representation of a distinguished name contained in str into its components, which are stored in as ldap_ava structures, arranged in LDAPAVA, LDAPRDN, and LDAPDN terms. Space for dn will be obtained dynamically and should be freed by the caller using ldap_dnfree(3). The LDAPDN is defined as: