Sun Directory Server Enterprise Edition 7.0 Developer's Guide

slapi_ch_free_string()

Frees an existing string allocated by the slapi_ch_malloc() ,slapi_ch_realloc(), and slapi_ch_calloc(). Call this function instead of the standard free() C function.

Syntax

#include "slapi-plugin.h"
void slapi_ch_free_string( char **s );

Parameters

This function takes the following parameter:

s

Address of the string that you wish to free.

Description

This function frees an existing string, and should be used in favor of slapi_ch_free() when using strings. It will perform compile-time error checking for incorrect error arguments, as opposed to slapi_ch_free(), which defeats the compile-time checking because you must cast the argument to (void**).

See Also

slapi_ch_free()

slapi_ch_calloc()

slapi_ch_malloc()

slapi_ch_realloc()

slapi_ch_strdup()