From: Howard Chu Date: Fri, 21 May 2004 10:53:30 +0000 (+0000) Subject: ITS#3123 make sure ldap_int_sasl_mutex is init'd before it is used X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~346 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cc4d5c10df67c67927d878da9dcd593125717cb2;p=openldap ITS#3123 make sure ldap_int_sasl_mutex is init'd before it is used --- diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c index 2b632482a8..d98b534863 100644 --- a/libraries/libldap/cyrus.c +++ b/libraries/libldap/cyrus.c @@ -114,8 +114,6 @@ int ldap_int_sasl_init( void ) ldap_pvt_sasl_mutex_lock, ldap_pvt_sasl_mutex_unlock, ldap_pvt_sasl_mutex_dispose ); - - ldap_pvt_thread_mutex_init( &ldap_int_sasl_mutex ); #endif if ( sasl_client_init( NULL ) == SASL_OK ) { diff --git a/libraries/libldap/util-int.c b/libraries/libldap/util-int.c index 2d3e3ba97b..e4975e0ff4 100644 --- a/libraries/libldap/util-int.c +++ b/libraries/libldap/util-int.c @@ -405,6 +405,10 @@ void ldap_int_utils_init( void ) ldap_pvt_thread_mutex_init( &ldap_int_ctime_mutex ); #endif ldap_pvt_thread_mutex_init( &ldap_int_resolv_mutex ); + +#ifdef HAVE_CYRUS_SASL + ldap_pvt_thread_mutex_init( &ldap_int_sasl_mutex ); +#endif #endif /* call other module init functions here... */