summaryrefslogtreecommitdiff
path: root/usr/src/lib/libldap4/common/utils.c
blob: 922e648ab77a2ab678dda3f25138858db80b9ab7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 *
 * Copyright 1998 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 *
 *
 * Comments:   
 *
 */

#pragma ident	"%Z%%M%	%I%	%E% SMI"

#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>

void free_strarray( char **sap )
{
    int		i;

    if ( sap != NULL ) {
		for ( i = 0; sap[ i ] != NULL; ++i ) {
			free( sap[ i ] );
		}
		free( (char *)sap );
    }
}