Table of Contents | Previous | Next | Index

Netscape Directory SDK 3.0 for C Programmer’s Guide
     Chapter 18 Functions

ldap_memfree()

ldap_memfree() frees memory allocated by an LDAP API function call. For more information, see "Managing Memory" on page 70.

Syntax

#include <ldap.h>
void ldap_memfree( void *p );

Parameters

This function has the following parameters:

p

Pointer to memory used by the LDAP library.

Example

The following section of code frees the memory allocated by the ldap_get_dn() function.

#include <ldap.h>
...
LDAP *ld;
char *dn;
LDAPMessage *entry;
...
/* Get the distinguished name (DN) for an entry */
dn = ldap_get_dn( ld, entry );
...
/* When you are finished working with the DN, free the memory allocated for the DN */
ldap_memfree( dn );
...

See Also

ldap_free_friendlymap(), ldap_free_urldesc(), ldap_msgfree(), ldap_value_free(), ldap_value_free_len().


Table of Contents | Previous | Next | Index

Last Updated: 10/01/98 17:06:23