mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-21 15:19:34 -05:00
Do not leak lds in slapd-* tools
This commit is contained in:
parent
5b55054544
commit
593512bb7b
4 changed files with 11 additions and 3 deletions
|
|
@ -469,6 +469,9 @@ novals:;
|
||||||
|
|
||||||
if ( ndns == 0 ) {
|
if ( ndns == 0 ) {
|
||||||
tester_error( "No DNs" );
|
tester_error( "No DNs" );
|
||||||
|
if ( ld != NULL ) {
|
||||||
|
ldap_unbind_ext( ld, NULL, NULL );
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -518,6 +518,7 @@ retry:;
|
||||||
|
|
||||||
if ( rc != LDAP_OPT_SUCCESS ) {
|
if ( rc != LDAP_OPT_SUCCESS ) {
|
||||||
tester_ldap_error( ld, "ldap_set_option(SECPROPS)", NULL );
|
tester_ldap_error( ld, "ldap_set_option(SECPROPS)", NULL );
|
||||||
|
ldap_unbind_ext( ld, NULL, NULL );
|
||||||
exit( EXIT_FAILURE );
|
exit( EXIT_FAILURE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -552,7 +553,7 @@ retry:;
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tester_ldap_error( ld, "ldap_sasl_bind_s", NULL );
|
ldap_unbind_ext( ld, NULL, NULL );
|
||||||
exit( EXIT_FAILURE );
|
exit( EXIT_FAILURE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,9 @@ do_modify( struct tester_conn_args *config,
|
||||||
mods[1] = NULL;
|
mods[1] = NULL;
|
||||||
|
|
||||||
retry:;
|
retry:;
|
||||||
|
if ( ld == NULL ) {
|
||||||
tester_init_ld( &ld, config, 0 );
|
tester_init_ld( &ld, config, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
if ( do_retry == config->retries ) {
|
if ( do_retry == config->retries ) {
|
||||||
fprintf( stderr, "PID=%ld - Modify(%d): entry=\"%s\".\n",
|
fprintf( stderr, "PID=%ld - Modify(%d): entry=\"%s\".\n",
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,9 @@ do_modrdn( struct tester_conn_args *config,
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
retry:;
|
retry:;
|
||||||
|
if ( ld == NULL ) {
|
||||||
tester_init_ld( &ld, config, 0 );
|
tester_init_ld( &ld, config, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
if ( do_retry == config->retries ) {
|
if ( do_retry == config->retries ) {
|
||||||
fprintf( stderr, "PID=%ld - Modrdn(%d): entry=\"%s\".\n",
|
fprintf( stderr, "PID=%ld - Modrdn(%d): entry=\"%s\".\n",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue