]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9590 libldap: fix missing unlock on connection alloc failure
authorKonstantin Andreev <grapvar@gmail.com>
Thu, 24 Jun 2021 10:37:56 +0000 (10:37 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 24 Jun 2021 12:40:44 +0000 (13:40 +0100)
libraries/libldap/open.c

index 7fe9f9c29318eae0057d0b0759820fdfaeef14ba..05f6a84c804200ee49974623e8a70fe8a93b3dd7 100644 (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 );
        }