From 60754d77c8d8a5c238562181fcc47ef2a05a8d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Tue, 14 May 2019 12:54:58 +0100 Subject: [PATCH] ITS#8755 Do not close the default SockBuf a second time --- libraries/libldap/unbind.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/libldap/unbind.c b/libraries/libldap/unbind.c index 688e3bf221..a390717cac 100644 --- a/libraries/libldap/unbind.c +++ b/libraries/libldap/unbind.c @@ -131,7 +131,9 @@ ldap_ld_free( } LDAP_MUTEX_UNLOCK( &ld->ld_res_mutex ); - ber_sockbuf_free( ld->ld_sb ); + /* Should already be closed by ldap_free_connection which knows not to free + * this one */ + ber_int_sb_destroy( ld->ld_sb ); LDAP_MUTEX_LOCK( &ld->ld_ldopts_mutex );