https://bugs.openldap.org/show_bug.cgi?id=9292
Issue ID: 9292 Summary: Man page for LDAP_OPT_TIMEOUT/LDAP_OPT_NETWORK_TIMEOUT unclear on use of free Product: OpenLDAP Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: documentation Assignee: bugs@openldap.org Reporter: sshanks@kx.com Target Milestone: ---
Ref: https://git.openldap.org/openldap/openldap/-/blob/master/doc/man/man3/ldap_g... https://www.openldap.org/software/man.cgi?query=ldap_get_option&sektion=...
See details of LDAP_OPT_TIMEOUT and LDAP_OPT_NETWORK_TIMEOUT. Both state "the caller has to free *outvalue"
This can be interpreted as the called must call free on outvalue. This can cause a random crash when 'free' used (build on Linux ran ok, Windows crashed immediately)
Would be better is it stated that the caller must use 'ldap_memfree', in the same way as other options state use must use 'ldap_memfree'.
FYI: within the code, get_option for these params calls ldap_int_timeval_dup which calls LDAP_MALLOC