mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 01:29:59 -05:00
ITS#9809: pcache, mdb: fix SEGV in monitor shutdown
This commit is contained in:
parent
a9d98407d2
commit
e29ba72c56
2 changed files with 5 additions and 3 deletions
|
|
@ -578,10 +578,11 @@ mdb_monitor_db_close( BackendDB *be )
|
|||
monitor_extra_t *mbe;
|
||||
|
||||
if ( mi && mi->bi_extra ) {
|
||||
struct berval dummy = BER_BVNULL;
|
||||
mbe = mi->bi_extra;
|
||||
mbe->unregister_entry_callback( &mdb->mi_monitor.mdm_ndn,
|
||||
(monitor_callback_t *)mdb->mi_monitor.mdm_cb,
|
||||
NULL, 0, NULL );
|
||||
&dummy, 0, &dummy );
|
||||
}
|
||||
|
||||
memset( &mdb->mi_monitor, 0, sizeof( mdb->mi_monitor ) );
|
||||
|
|
|
|||
|
|
@ -5660,15 +5660,16 @@ pcache_monitor_db_close( BackendDB *be )
|
|||
slap_overinst *on = (slap_overinst *)be->bd_info;
|
||||
cache_manager *cm = on->on_bi.bi_private;
|
||||
|
||||
if ( cm->monitor_cb != NULL ) {
|
||||
if ( !BER_BVISNULL( &cm->monitor_ndn )) {
|
||||
BackendInfo *mi = backend_info( "monitor" );
|
||||
monitor_extra_t *mbe;
|
||||
|
||||
if ( mi && mi->bi_extra ) {
|
||||
struct berval dummy = BER_BVNULL;
|
||||
mbe = mi->bi_extra;
|
||||
mbe->unregister_entry_callback( &cm->monitor_ndn,
|
||||
(monitor_callback_t *)cm->monitor_cb,
|
||||
NULL, 0, NULL );
|
||||
&dummy, 0, &dummy );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue