ldap_msgfree()--Free LDAP Result Message



  Syntax
 #include <ldap.h>

 int ldap_msgfree(
          LDAPMessage  *msg)

  Default Public Authority: *USE

  Library Name/Service Program: QSYS/QGLDCLNT

  Threadsafe: Yes

The ldap_msgfree() routine is used to free the memory allocated for an LDAP message by ldap_result(), ldap_search_s(), ldap_search_ext_s() or ldap_search_st(). It takes a pointer to the result to be freed and returns the type of the message it freed.


Authorities and Locks

No i5/OS authority is required.


Parameters

msg
(Input) Specifies pointer to the memory allocated for an LDAP message by ldap_result(), ldap_search_s(), ldap_search_ext_s() or ldap_search_st().

Return Values

Message Type
the type of the message freed.

ZERO
if the input pointer to LDAPMessage structure is NULL.

Error Conditions

The ldap_msgfree() API returns ZERO if the input pointer to LDAPMessage structure is NULL.


Error Messages

The following message may be sent from this function.

Message ID Error Message Text
CPF3CF2 E Error(s) occurred during running of ldap_msgfree API.


Related Information


API introduced: V4R3
Top | LDAP APIs | APIs by category