https://bugs.openldap.org/show_bug.cgi?id=9590

          Issue ID: 9590
           Summary: missed mutex unlock
           Product: OpenLDAP
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: ---
         Component: libraries
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Unlikely causes a harm, but oughts fixing ...

diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c
index 7fe9f9c29..05f6a84c8 100644
--- a/libraries/libldap/open.c
+++ b/libraries/libldap/open.c
@@ -349,8 +349,9 @@ ldap_init_fd(
        LDAP_MUTEX_LOCK( &ld->ld_conn_mutex );
        /* 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 );
        }
        if( url )

-- 
You are receiving this mail because:
You are on the CC list for the issue.

Reply via email to