openldap/servers/slapd/back-perl/close.c

60 lines
1.3 KiB
C
Raw Normal View History

/* $OpenLDAP$ */
2003-12-07 03:25:01 +08:00
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
2017-01-04 04:36:47 +08:00
* Copyright 1999-2017 The OpenLDAP Foundation.
2003-12-07 03:25:01 +08:00
* Portions Copyright 1999 John C. Quillan.
* Portions Copyright 2002 myinternet Limited.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted only as authorized by the OpenLDAP
* Public License.
*
2003-12-07 03:25:01 +08:00
* A copy of this license is available in file LICENSE in the
* top-level directory of the distribution or, alternatively, at
* <http://www.OpenLDAP.org/license.html>.
*/
#include "perl_back.h"
2007-09-01 08:28:07 +08:00
#include "../config.h"
/**********************************************************
*
* Close
*
**********************************************************/
int
perl_back_close(
BackendInfo *bd
)
{
2002-04-16 12:25:44 +08:00
perl_destruct(PERL_INTERPRETER);
perl_free(PERL_INTERPRETER);
PERL_INTERPRETER = NULL;
2009-06-24 07:12:15 +08:00
#ifdef PERL_SYS_TERM
PERL_SYS_TERM();
#endif
ldap_pvt_thread_mutex_destroy( &perl_interpreter_mutex );
return 0;
}
int
perl_back_db_destroy(
BackendDB *be,
ConfigReply *cr
)
{
2011-02-04 23:25:42 +08:00
PerlBackend *pb = be->be_private;
ch_free( pb->pb_module_name );
2011-02-04 23:25:42 +08:00
ber_bvarray_free( pb->pb_module_path );
ber_bvarray_free( pb->pb_module_config );
free( be->be_private );
be->be_private = NULL;
2002-04-16 11:51:51 +08:00
return 0;
}