From: Pierangelo Masarati Date: Fri, 31 Mar 2006 23:07:48 +0000 (+0000) Subject: don't use uninitialized mutexes X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~66 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7cba7d0b396876431d6df53c92bc0fb733828534;p=openldap don't use uninitialized mutexes --- diff --git a/servers/slapd/back-monitor/cache.c b/servers/slapd/back-monitor/cache.c index 071ae06ab9..89bfe044b4 100644 --- a/servers/slapd/back-monitor/cache.c +++ b/servers/slapd/back-monitor/cache.c @@ -89,7 +89,6 @@ monitor_cache_add( assert( e != NULL ); mp = ( monitor_entry_t *)e->e_private; - ldap_pvt_thread_mutex_init( &mp->mp_mutex ); mc = ( monitor_cache_t * )ch_malloc( sizeof( monitor_cache_t ) ); mc->mc_ndn = e->e_nname; diff --git a/servers/slapd/back-monitor/entry.c b/servers/slapd/back-monitor/entry.c index 282b250c0b..a7b83d489f 100644 --- a/servers/slapd/back-monitor/entry.c +++ b/servers/slapd/back-monitor/entry.c @@ -163,6 +163,8 @@ monitor_entrypriv_create( void ) mp->mp_flags = MONITOR_F_NONE; mp->mp_cb = NULL; + ldap_pvt_thread_mutex_init( &mp->mp_mutex ); + return mp; }