]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9906 Do not touch subsys members after mss_destroy called
authorOndřej Kuzník <ondra@mistotebe.net>
Tue, 30 Aug 2022 12:17:27 +0000 (13:17 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 12 Sep 2022 20:42:10 +0000 (20:42 +0000)
servers/slapd/back-monitor/init.c

index 1b6ab33a4940c58e528b7fb5867e853e80fcf3aa..af79fb4cf00d01351d85f5a1fc61e8b3fd80e052 100644 (file)
@@ -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 );