if ( ndns == 0 ) {
tester_error( "No DNs" );
+ if ( ld != NULL ) {
+ ldap_unbind_ext( ld, NULL, NULL );
+ }
return 1;
}
if ( rc != LDAP_OPT_SUCCESS ) {
tester_ldap_error( ld, "ldap_set_option(SECPROPS)", NULL );
+ ldap_unbind_ext( ld, NULL, NULL );
exit( EXIT_FAILURE );
}
}
goto retry;
}
}
- tester_ldap_error( ld, "ldap_sasl_bind_s", NULL );
+ ldap_unbind_ext( ld, NULL, NULL );
exit( EXIT_FAILURE );
}
}
mods[1] = NULL;
retry:;
- tester_init_ld( &ld, config, 0 );
+ if ( ld == NULL ) {
+ tester_init_ld( &ld, config, 0 );
+ }
if ( do_retry == config->retries ) {
fprintf( stderr, "PID=%ld - Modify(%d): entry=\"%s\".\n",
i = 0;
retry:;
- tester_init_ld( &ld, config, 0 );
+ if ( ld == NULL ) {
+ tester_init_ld( &ld, config, 0 );
+ }
if ( do_retry == config->retries ) {
fprintf( stderr, "PID=%ld - Modrdn(%d): entry=\"%s\".\n",