summaryrefslogtreecommitdiff
path: root/usr/src/lib/libldap4/common/utils.c
diff options
context:
space:
mode:
authorstevel@tonic-gate <none@none>2005-06-14 00:00:00 -0700
committerstevel@tonic-gate <none@none>2005-06-14 00:00:00 -0700
commit7c478bd95313f5f23a4c958a745db2134aa03244 (patch)
treec871e58545497667cbb4b0a4f2daf204743e1fe7 /usr/src/lib/libldap4/common/utils.c
downloadillumos-joyent-7c478bd95313f5f23a4c958a745db2134aa03244.tar.gz
OpenSolaris Launch
Diffstat (limited to 'usr/src/lib/libldap4/common/utils.c')
-rw-r--r--usr/src/lib/libldap4/common/utils.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/usr/src/lib/libldap4/common/utils.c b/usr/src/lib/libldap4/common/utils.c
new file mode 100644
index 0000000000..e3652ac275
--- /dev/null
+++ b/usr/src/lib/libldap4/common/utils.c
@@ -0,0 +1,27 @@
+/*
+ *
+ * Copyright %G% Sun Microsystems, Inc. All Rights Reserved
+ *
+ *
+ * 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 );
+ }
+}