From: Ondřej Kuzník Date: Tue, 30 Aug 2022 12:17:27 +0000 (+0100) Subject: ITS#9906 Do not touch subsys members after mss_destroy called X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2362c7ccc7aa59e1481a8f4908c8a609b7c16591;p=thirdparty%2Fopenldap.git ITS#9906 Do not touch subsys members after mss_destroy called --- diff --git a/servers/slapd/back-monitor/init.c b/servers/slapd/back-monitor/init.c index 1b6ab33a49..af79fb4cf0 100644 --- a/servers/slapd/back-monitor/init.c +++ b/servers/slapd/back-monitor/init.c @@ -2537,13 +2537,13 @@ monitor_back_db_destroy( int i; for ( i = 0; monitor_subsys[ i ] != NULL; i++ ) { - if ( monitor_subsys[ i ]->mss_destroy ) { - monitor_subsys[ i ]->mss_destroy( be, monitor_subsys[ i ] ); - } - if ( !BER_BVISNULL( &monitor_subsys[ i ]->mss_rdn ) ) { ch_free( monitor_subsys[ i ]->mss_rdn.bv_val ); } + + if ( monitor_subsys[ i ]->mss_destroy ) { + monitor_subsys[ i ]->mss_destroy( be, monitor_subsys[ i ] ); + } } ch_free( monitor_subsys );