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: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Ref:
https://git.openldap.org/openldap/openldap/-/blob/master/doc/man/man3/ldap_get_option.3
https://www.openldap.org/software/man.cgi?query=ldap_get_option&sektion=3&apropos=0&manpath=OpenLDAP+2.4-Release

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

-- 
You are receiving this mail because:
You are on the CC list for the issue.

Reply via email to