diff options
-rw-r--r-- | lib/openldap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/openldap.c b/lib/openldap.c index 88bbb64a1..c8e8da4ef 100644 --- a/lib/openldap.c +++ b/lib/openldap.c @@ -369,7 +369,7 @@ static CURLcode ldap_disconnect(struct Curl_easy *data, if(li) { if(li->ld) { #ifdef USE_SSL - if(conn->ssl[FIRSTSOCKET].use) { + if(conn->ssl[FIRSTSOCKET].use && li->sslinst) { Sockbuf *sb; ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb); ber_sockbuf_add_io(sb, &ldapsb_tls, LBER_SBIOD_LEVEL_TRANSPORT, data); |