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_4_48~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cb7f2f81853b3365f138cab347cbbfced298a98;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 00d3df2114..b1597cb03d 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 );