ITS#9590 libldap: fix missing unlock on connection alloc failure

This commit is contained in:
Konstantin Andreev 2021-06-24 10:37:56 +00:00 committed by Howard Chu
parent 4cd096deff
commit 7bd1fac58c

View File

@ -350,6 +350,7 @@ ldap_init_fd(
/* Attach the passed socket as the LDAP's connection */
conn = ldap_new_connection( ld, NULL, 1, 0, NULL, 0, 0 );
if( conn == NULL ) {
LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex );
ldap_unbind_ext( ld, NULL, NULL );
return( LDAP_NO_MEMORY );
}