ITS#8957 - Fix ASYNC TLS

Fix ASYNC TLS by correctly handling a return code of -2 in addition to 0
This commit is contained in:
Quanah Gibson-Mount 2019-01-31 02:33:17 +00:00
parent 50b33cc6b8
commit 09ff530036

View file

@ -489,7 +489,7 @@ ldap_int_open_connection(
#endif #endif
#ifdef HAVE_TLS #ifdef HAVE_TLS
if (rc == 0 && ( ld->ld_options.ldo_tls_mode == LDAP_OPT_X_TLS_HARD || if ((rc == 0 || rc == -2) && ( ld->ld_options.ldo_tls_mode == LDAP_OPT_X_TLS_HARD ||
strcmp( srv->lud_scheme, "ldaps" ) == 0 )) strcmp( srv->lud_scheme, "ldaps" ) == 0 ))
{ {
++conn->lconn_refcnt; /* avoid premature free */ ++conn->lconn_refcnt; /* avoid premature free */