[Date Prev][Date Next] [Chronological] [Thread] [Top]

slaptest segfaults on exit after successful check (ITS#3326)



Full_Name: Dmitry Butskoj
Version: 2.2.15
OS: Linux Fedora Core 1
URL: 
Submission from: (NULL) (194.85.100.27)


What happens:

# slaptest
config file testing succeeded
Segmentation fault
#

Always reproduceable.

  The problem is `slap_tool_destroy()' (see "servers/slapd/slapcommon.c") always
invoke `slap_shutdown()', but for SLAPTEST/SLAPDN appropriate `slap_startup()'
is never used.

  The patch against 2.2.15 version:

diff -Nrbu openldap-2.2.15/servers/slapd/slapcommon.c
openldap-2.2.15-OK/servers/slapd/slapcommon.c
--- openldap-2.2.15/servers/slapd/slapcommon.c  2004-07-18 10:35:47.000000000
+0400
+++ openldap-2.2.15-OK/servers/slapd/slapcommon.c       2004-09-10
16:36:32.000000000 +0400
@@ -456,7 +456,7 @@
                                                                                
                      
 void slap_tool_destroy( void )
 {
-       if ( !dryrun ) {
+       if ( !dryrun && be != NULL ) {
                slap_shutdown( be );
        }
        slap_destroy();