1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-23 00:28:48 -05:00

openldap: disconnect better

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 e467ea3bd9
Assisted-by: Patrick Monnerat
Closes #6787
This commit is contained in:
Daniel Stenberg 2021-03-24 14:57:19 +01:00
parent 1803be5746
commit a5eee22e59
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View 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;
}