xref: /netbsd-src/external/bsd/openldap/dist/servers/slapd/back-perl/close.c (revision 6a1508dad3515842aa76bf5ec8fc2daab5f5af02)
1 /* $OpenLDAP: pkg/ldap/servers/slapd/back-perl/close.c,v 1.17.2.3 2008/02/11 23:26:47 kurt Exp $ */
2 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
3  *
4  * Copyright 1999-2008 The OpenLDAP Foundation.
5  * Portions Copyright 1999 John C. Quillan.
6  * Portions Copyright 2002 myinternet Limited.
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted only as authorized by the OpenLDAP
11  * Public License.
12  *
13  * A copy of this license is available in file LICENSE in the
14  * top-level directory of the distribution or, alternatively, at
15  * <http://www.OpenLDAP.org/license.html>.
16  */
17 
18 #include "perl_back.h"
19 #include "../config.h"
20 /**********************************************************
21  *
22  * Close
23  *
24  **********************************************************/
25 
26 int
27 perl_back_close(
28 	BackendInfo *bd
29 )
30 {
31 	perl_destruct(PERL_INTERPRETER);
32 	perl_free(PERL_INTERPRETER);
33 	PERL_INTERPRETER = NULL;
34 
35 	ldap_pvt_thread_mutex_destroy( &perl_interpreter_mutex );
36 
37 	return 0;
38 }
39 
40 int
41 perl_back_db_destroy(
42 	BackendDB *be,
43 	ConfigReply *cr
44 )
45 {
46 	free( be->be_private );
47 	be->be_private = NULL;
48 
49 	return 0;
50 }
51