From 7cba7d0b396876431d6df53c92bc0fb733828534 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 31 Mar 2006 23:07:48 +0000 Subject: [PATCH] don't use uninitialized mutexes --- servers/slapd/back-monitor/cache.c | 1 - servers/slapd/back-monitor/entry.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.39.5