diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-04-22 22:45:42 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-04-22 22:45:42 +0200 |
commit | 8ceac6cb79517102811d45bad16154fc6d1e4efe (patch) | |
tree | 6e15df60b6776335b2c8a06669291c2f56beca0e | |
parent | 7f2d7ed14277aca0601170610c53ba9e1cd621b7 (diff) | |
download | curl-bagder/openldap-disconnect.tar.gz |
openldap: fix crash in ldaps disconnectbagder/openldap-disconnect
Reported-by: Illarion Taev
Fixes #6934
-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); |