]> git.sur5r.net Git - openldap/commitdiff
ITS#7358 fix ITS#7270 patch
authorHoward Chu <hyc@openldap.org>
Tue, 21 Aug 2012 20:22:19 +0000 (13:22 -0700)
committerHoward Chu <hyc@openldap.org>
Tue, 21 Aug 2012 20:22:19 +0000 (13:22 -0700)
commit 8bb9e88d5f8731fe73c47ba3eb8812a410dbb85c breaks Visual C
(as well as our own coding rules)

libraries/libldap/init.c

index 0e53104cd4d3bd16331043bce80b7f9e94aa443a..34ff981a6df3f68ee110732d5fbe7d79975f0230 100644 (file)
@@ -641,8 +641,8 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
 #endif
 
 #if defined(HAVE_TLS) || defined(HAVE_CYRUS_SASL)
+       LDAP_MUTEX_LOCK( &ldap_int_hostname_mutex );
        {
-               LDAP_MUTEX_LOCK( &ldap_int_hostname_mutex );
                char    *name = ldap_int_hostname;
 
                ldap_int_hostname = ldap_pvt_get_fqdn( name );
@@ -650,8 +650,8 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
                if ( name != NULL && name != ldap_int_hostname ) {
                        LDAP_FREE( name );
                }
-               LDAP_MUTEX_UNLOCK( &ldap_int_hostname_mutex );
        }
+       LDAP_MUTEX_UNLOCK( &ldap_int_hostname_mutex );
 #endif
 
 #ifndef HAVE_POLL