]> git.sur5r.net Git - openldap/commitdiff
don't use uninitialized mutexes
authorPierangelo Masarati <ando@openldap.org>
Fri, 31 Mar 2006 23:07:48 +0000 (23:07 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 31 Mar 2006 23:07:48 +0000 (23:07 +0000)
servers/slapd/back-monitor/cache.c
servers/slapd/back-monitor/entry.c

index 071ae06ab968a32352d03c935c491dae64969a0f..89bfe044b49d28ff1bba8f7feec94d993206bbd7 100644 (file)
@@ -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;
index 282b250c0bdccc57ad5987f670245f7f4367abfd..a7b83d489fb9be3175b0d44e4e468e67a32ca858 100644 (file)
@@ -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;
 }