]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
openldap: disconnect better
authorDaniel Stenberg <daniel@haxx.se>
Wed, 24 Mar 2021 13:57:19 +0000 (14:57 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 24 Mar 2021 22:02:33 +0000 (23:02 +0100)
Instead of clearing the callback argument in disconnect, set it to the
(new) transfer to make sure the correct data is passed to the callbacks.

Follow-up to e467ea3bd937f38
Assisted-by: Patrick Monnerat
Closes #6787

lib/openldap.c

index 066c0fd73f91bb67a86799cf17b3742569d8eab8..c80ac8b07c71fcf4b1f78caeabcddbc41885757d 100644 (file)
@@ -371,7 +371,7 @@ static CURLcode ldap_disconnect(struct Curl_easy *data,
     if(li->ld) {
       Sockbuf *sb;
       ldap_get_option(li->ld, LDAP_OPT_SOCKBUF, &sb);
-      ber_sockbuf_add_io(sb, &ldapsb_tls, LBER_SBIOD_LEVEL_TRANSPORT, NULL);
+      ber_sockbuf_add_io(sb, &ldapsb_tls, LBER_SBIOD_LEVEL_TRANSPORT, data);
       ldap_unbind_ext(li->ld, NULL, NULL);
       li->ld = NULL;
     }