]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
openldap: protect SSL-specific code with proper #ifdef
authorDaniel Stenberg <daniel@haxx.se>
Thu, 15 Apr 2021 20:47:09 +0000 (22:47 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 15 Apr 2021 21:31:41 +0000 (23:31 +0200)
Closes #6901

lib/openldap.c

index b6980c590021b84ec99386c068dbf27692739a36..e608c50237efb5e739dff16a5fb7e0b0bb82e77d 100644 (file)
@@ -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;
     }