diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-04-15 22:47:09 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-04-15 23:31:41 +0200 |
commit | 2cd26861296c701d6380bc770ea3e09f72187aad (patch) | |
tree | 38bd1be9581b79c7bffe06edbcb8e3a394604b52 | |
parent | b532d35b5c97a2900f8511f3ecbf45c9342cfcba (diff) | |
download | curl-2cd26861296c701d6380bc770ea3e09f72187aad.tar.gz |
openldap: protect SSL-specific code with proper #ifdef
Closes #6901
-rw-r--r-- | lib/openldap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/openldap.c b/lib/openldap.c index b6980c590..e608c5023 100644 --- a/lib/openldap.c +++ b/lib/openldap.c @@ -368,11 +368,13 @@ static CURLcode ldap_disconnect(struct Curl_easy *data, if(li) { if(li->ld) { +#ifdef USE_SSL if(conn->ssl[FIRSTSOCKET].use) { Sockbuf *sb; ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb); ber_sockbuf_add_io(sb, &ldapsb_tls, LBER_SBIOD_LEVEL_TRANSPORT, data); } +#endif ldap_unbind_ext(li->ld, NULL, NULL); li->ld = NULL; } |