if ( ldp ) {
*ldp = ld;
- } else if (ld != NULL ) {
+ } else if ( ld != NULL ) {
ldap_unbind_ext( ld, NULL, NULL );
}
}
/* Ok, got list of RDNs, now start binding to each */
- for (i=0; i<maxloop; i++) {
+ for ( i = 0; i < maxloop; i++ ) {
char dn[BUFSIZ], *ptr;
int j, k;
fprintf( stderr, "Done %d Binds in %ld.%06ld seconds.\n", i,
(long) end.tv_sec, (long) end.tv_usec );
#endif
+
+ if ( rdns ) {
+ for ( i = 0; i < nrdns; i++ ) {
+ free( rdns[i].bv_val );
+ }
+ free( rdns );
+ }
+
return 0;
}