From: Pierangelo Masarati Date: Sat, 9 Sep 2006 16:25:32 +0000 (+0000) Subject: don't bother about unregistering stuff during shutdown X-Git-Tag: OPENLDAP_REL_ENG_2_3_MP~175 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c826725b7ab852d4f5b856e1d2c3e013b440225a;p=openldap don't bother about unregistering stuff during shutdown --- diff --git a/servers/slapd/back-monitor/cache.c b/servers/slapd/back-monitor/cache.c index 3639dd11a6..9c96c0c154 100644 --- a/servers/slapd/back-monitor/cache.c +++ b/servers/slapd/back-monitor/cache.c @@ -264,7 +264,10 @@ retry:; } } - monitor_cache_release( mi, mc->mc_e ); + + if ( mc ) { + monitor_cache_release( mi, mc->mc_e ); + } } ldap_pvt_thread_mutex_unlock( &mi->mi_cache_mutex ); diff --git a/servers/slapd/back-monitor/init.c b/servers/slapd/back-monitor/init.c index 008ce40c96..3f6bb03dbc 100644 --- a/servers/slapd/back-monitor/init.c +++ b/servers/slapd/back-monitor/init.c @@ -1028,6 +1028,12 @@ monitor_back_unregister_entry( return -1; } + /* entry will be regularly freed, and resources released + * according to callbacks */ + if ( slapd_shutdown ) { + return 0; + } + mi = ( monitor_info_t * )be_monitor->be_private; assert( mi != NULL ); @@ -1124,6 +1130,12 @@ monitor_back_unregister_entry_parent( return -1; } + /* entry will be regularly freed, and resources released + * according to callbacks */ + if ( slapd_shutdown ) { + return 0; + } + mi = ( monitor_info_t * )be_monitor->be_private; assert( mi != NULL ); @@ -1264,6 +1276,12 @@ monitor_back_unregister_entry_attrs( return -1; } + /* entry will be regularly freed, and resources released + * according to callbacks */ + if ( slapd_shutdown ) { + return 0; + } + mi = ( monitor_info_t * )be_monitor->be_private; assert( mi != NULL );