summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-04-15 22:47:09 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-04-15 23:31:41 +0200
commit2cd26861296c701d6380bc770ea3e09f72187aad (patch)
tree38bd1be9581b79c7bffe06edbcb8e3a394604b52
parentb532d35b5c97a2900f8511f3ecbf45c9342cfcba (diff)
downloadcurl-2cd26861296c701d6380bc770ea3e09f72187aad.tar.gz
openldap: protect SSL-specific code with proper #ifdef
Closes #6901
-rw-r--r--lib/openldap.c2
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;
}