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

slapi_ch_array_free()

Frees an existing array.

Syntax

#include "slapi-plugin.h"
 void slapi_ch_array_free( char **arrayp );

Parameters

This function takes the following parameter:

arrayp

Pointer to the array to be freed. This parameter can be NULL.

Description

This function frees the char ** pointed to by arrayp . In the following excerpt, for example, both array and a1 are freed:

char **array;
char *a1;

array = malloc(2*sizeof(char *));
a1 = strdup("hello");

array[0] = a1;
array[1] = NULL;

slapi_ch_array_free(array);