From: Ondřej Kuzník Date: Tue, 14 May 2019 11:54:58 +0000 (+0100) Subject: ITS#8755 Do not close the default SockBuf a second time X-Git-Tag: OPENLDAP_REL_ENG_2_5_0ALPHA~67^2~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60754d77c8d8a5c238562181fcc47ef2a05a8d13;p=thirdparty%2Fopenldap.git ITS#8755 Do not close the default SockBuf a second time --- 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 );