]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slaptest.c
ITS#7588 fix double-free for sorted paged search
[openldap] / servers / slapd / slaptest.c
index c47abf85d78098755cd962b63162a42678fa6a04..995b603f4044c99bb457b8562ac5c41e7f0da471 100644 (file)
@@ -1,6 +1,7 @@
+/* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2004-2008 The OpenLDAP Foundation.
+ * Copyright 2004-2013 The OpenLDAP Foundation.
  * Portions Copyright 2004 Pierangelo Masarati.
  * All rights reserved.
  *
 
 #include "slapcommon.h"
 
+#ifndef S_IWRITE
+#define S_IWRITE       S_IWUSR
+#endif
+
 static int
 test_file( const char *fname, const char *ftype )
 {
@@ -108,7 +113,8 @@ slaptest( int argc, char **argv )
                fprintf( stderr, "config file testing succeeded\n");
        }
 
-       slap_tool_destroy();
+       if ( slap_tool_destroy())
+               rc = EXIT_FAILURE;
 
        return rc;
 }