ITS#9908 slapd-tester: plug LDAP* leak on bind retries

This commit is contained in:
Ondřej Kuzník 2022-08-31 17:28:42 +01:00 committed by Quanah Gibson-Mount
parent 1b80eb427f
commit 909c1baafa

View file

@ -522,6 +522,8 @@ retry:;
if ( rc != LDAP_SUCCESS ) {
tester_ldap_error( ld, "ldap_sasl_bind_s", NULL );
ldap_unbind_ext( ld, NULL, NULL );
ld = NULL;
switch ( rc ) {
case LDAP_BUSY:
case LDAP_UNAVAILABLE:
@ -533,8 +535,6 @@ retry:;
goto retry;
}
}
ldap_unbind_ext( ld, NULL, NULL );
ld = NULL;
if ( !( flags & TESTER_INIT_NOEXIT ))
exit( EXIT_FAILURE );
}