Back to index

openldap  2.4.31
Functions
free.c File Reference
#include "portable.h"
#include <stdio.h>
#include <ac/stdlib.h>
#include <ac/string.h>
#include <ac/time.h>
#include "ldap-int.h"

Go to the source code of this file.

Functions

void ldap_memfree (void *p)
void ldap_memvfree (void **v)
voidldap_memalloc (ber_len_t s)
voidldap_memcalloc (ber_len_t n, ber_len_t s)
voidldap_memrealloc (void *p, ber_len_t s)
char * ldap_strdup (LDAP_CONST char *p)
void ldap_mods_free (LDAPMod **mods, int freemods)

Function Documentation

Definition at line 51 of file free.c.

{
       return LDAP_MALLOC( s );
}

Here is the caller graph for this function:

Definition at line 57 of file free.c.

{
       return LDAP_CALLOC( n, s );
}

Here is the caller graph for this function:

Definition at line 39 of file free.c.

{
       LDAP_FREE( p );
}
void* ldap_memrealloc ( void p,
ber_len_t  s 
)

Definition at line 63 of file free.c.

{
       return LDAP_REALLOC( p, s );
}
void ldap_memvfree ( void **  v)

Definition at line 45 of file free.c.

{
       LDAP_VFREE( v );
}
void ldap_mods_free ( LDAPMod **  mods,
int  freemods 
)

Definition at line 81 of file free.c.

{
       int    i;

       if ( mods == NULL )
              return;

       for ( i = 0; mods[i] != NULL; i++ ) {
              if ( mods[i]->mod_op & LDAP_MOD_BVALUES ) {
                     if( mods[i]->mod_bvalues != NULL )
                            ber_bvecfree( mods[i]->mod_bvalues );

              } else if( mods[i]->mod_values != NULL ) {
                     LDAP_VFREE( mods[i]->mod_values );
              }

              if ( mods[i]->mod_type != NULL ) {
                     LDAP_FREE( mods[i]->mod_type );
              }

              LDAP_FREE( (char *) mods[i] );
       }

       if ( freemods ) {
              LDAP_FREE( (char *) mods );
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* ldap_strdup ( LDAP_CONST char *  p)

Definition at line 69 of file free.c.

{
       return LDAP_STRDUP( p );
}

Here is the caller graph for this function: