dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / lib / libldap5 / sources / ldap / common / freevalues.c
blob179e011a803705f21e0671c0eff4402b9c081bac
1 #pragma ident "%Z%%M% %I% %E% SMI"
3 /*
4 * The contents of this file are subject to the Netscape Public
5 * License Version 1.1 (the "License"); you may not use this file
6 * except in compliance with the License. You may obtain a copy of
7 * the License at http://www.mozilla.org/NPL/
9 * Software distributed under the License is distributed on an "AS
10 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
11 * implied. See the License for the specific language governing
12 * rights and limitations under the License.
14 * The Original Code is Mozilla Communicator client code, released
15 * March 31, 1998.
17 * The Initial Developer of the Original Code is Netscape
18 * Communications Corporation. Portions created by Netscape are
19 * Copyright (C) 1998-1999 Netscape Communications Corporation. All
20 * Rights Reserved.
22 * Contributor(s):
25 * Copyright (c) 1990 Regents of the University of Michigan.
26 * All rights reserved.
29 * freevalues.c
32 #include "ldap-int.h"
34 void
35 LDAP_CALL
36 ldap_value_free( char **vals )
38 int i;
40 if ( vals == NULL )
41 return;
42 for ( i = 0; vals[i] != NULL; i++ )
43 NSLDAPI_FREE( vals[i] );
44 NSLDAPI_FREE( (char *) vals );
47 void
48 LDAP_CALL
49 ldap_value_free_len( struct berval **vals )
51 int i;
53 if ( vals == NULL )
54 return;
55 for ( i = 0; vals[i] != NULL; i++ ) {
56 NSLDAPI_FREE( vals[i]->bv_val );
57 NSLDAPI_FREE( vals[i] );
59 NSLDAPI_FREE( (char *) vals );