+/* $OpenLDAP$ */
/*
* Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
return LDAP_NO_MEMORY;
}
- ctrls[nctrls] = NULL;
+ *ctrls[nctrls] = NULL;
for( tag = ber_first_element( ber, &len, &opaque );
tag != LBER_ERROR;
assert( controls != NULL );
if ( controls != NULL ) {
- LDAPControl *c;
+ int i;
- for(c = *controls; c != NULL; c++) {
- ldap_control_free( c );
+ for( i=0; controls[i] != NULL; i++) {
+ ldap_control_free( controls[i] );
}
LDAP_FREE( controls );