Sun Java System Directory Server Enterprise Edition 6.1 Developer's Guide

slapi_ch_free()

Frees space allocated by the slapi_ch_malloc(),slapi_ch_realloc(), and slapi_ch_calloc() functions and sets the pointer to NULL. Call this function instead of the standard free() C function.

Syntax

#include "slapi-plugin.h"
void slapi_ch_free( void **ptr );

Parameters

This function takes the following parameter:

ptr

Address of the pointer to the block of memory that you wish to free. If NULL, no action occurs.

Memory Concerns

The ptr passed to slapi_ch_free() should be the address of a pointer to memory allocated using a call to slapi_ch_malloc(),slapi_ch_realloc(),slapi_ch_calloc(), or slapi_ch_strdup() .

See Also

slapi_ch_calloc()

slapi_ch_malloc()

slapi_ch_realloc()

slapi_ch_strdup()