ldap_msgfree()--Free LDAP Result Message




Syntax

#include <ldap.h>

int ldap_msgfree(
		LDAPMessage 	*msg)



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 OS/400 authority is required. All authority checking is done by the LDAP server.

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 up.
ZERO
if the input pointer to LDAPMessage structure is NULL.

Error Conditions

ldap_msgfree() return ZERO if the input pointer to LDAPMessage structure is NULL.

Error Messages

    The following message may be set from this function.
    CPF3CF2 E  Error(s) occurred during running of ldap_msgfree API.

Related Information

    ldap_memfree() -- free up storage that has been allocated by the LDAP client library.
    ldap_control_free() -- free a single LDAPControl structure.
    ldap_controls_free() -- free an array of LDAPControl structures.
    ldap_ber_free() -- free up the BerElement structure.
    ldap_mods_free() -- free up an array of pointers to mod structures.


Top | LDAP APIs List
APIs by category

[Information Center Home Page | Feedback ] [Legal | AS/400 Glossary]