X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fdsparse.c;h=8ec7116fd9f2af43b18bb7d7d116c27cc3742ef0;hb=55dba4395f81f75ad8f247d3c0fad7119fe1ea9d;hp=336025db559ded4e89ec37e2353909720434816c;hpb=403f4479bc9f9a864122d4aeecf7284408918302;p=openldap diff --git a/libraries/libldap/dsparse.c b/libraries/libldap/dsparse.c index 336025db55..8ec7116fd9 100644 --- a/libraries/libldap/dsparse.c +++ b/libraries/libldap/dsparse.c @@ -1,6 +1,6 @@ /* $OpenLDAP$ */ /* - * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved. + * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ /* Portions @@ -39,9 +39,8 @@ static int next_line LDAP_P(( char **bufp, ber_len_t *blenp, char **linep )); static char *next_token LDAP_P(( char ** sp )); - int -next_line_tokens( char **bufp, ber_len_t *blenp, char ***toksp ) +ldap_int_next_line_tokens( char **bufp, ber_len_t *blenp, char ***toksp ) { char *p, *line, *token, **toks; int rc, tokcnt; @@ -72,7 +71,7 @@ next_line_tokens( char **bufp, ber_len_t *blenp, char ***toksp ) if ( tokcnt == 1 && strcasecmp( toks[ 0 ], "END" ) == 0 ) { tokcnt = 0; - free_strarray( toks ); + LDAP_VFREE( toks ); toks = NULL; } @@ -195,17 +194,3 @@ next_token( char **sp ) return( LDAP_STRDUP( tokstart )); } - - -void -free_strarray( char **sap ) -{ - int i; - - if ( sap != NULL ) { - for ( i = 0; sap[ i ] != NULL; ++i ) { - LBER_FREE( sap[ i ] ); - } - LBER_FREE( (char *)sap ); - } -}