Back to index

openldap  2.4.31
close.c
Go to the documentation of this file.
00001 /* $OpenLDAP$ */
00002 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
00003  *
00004  * Copyright 1999-2012 The OpenLDAP Foundation.
00005  * Portions Copyright 1999 John C. Quillan.
00006  * Portions Copyright 2002 myinternet Limited.
00007  * All rights reserved.
00008  *
00009  * Redistribution and use in source and binary forms, with or without
00010  * modification, are permitted only as authorized by the OpenLDAP
00011  * Public License.
00012  *
00013  * A copy of this license is available in file LICENSE in the
00014  * top-level directory of the distribution or, alternatively, at
00015  * <http://www.OpenLDAP.org/license.html>.
00016  */
00017 
00018 #include "perl_back.h"
00019 #include "../config.h"
00020 /**********************************************************
00021  *
00022  * Close
00023  *
00024  **********************************************************/
00025 
00026 int
00027 perl_back_close(
00028        BackendInfo *bd
00029 )
00030 {
00031        perl_destruct(PERL_INTERPRETER);
00032        perl_free(PERL_INTERPRETER);
00033        PERL_INTERPRETER = NULL;
00034 #ifdef PERL_SYS_TERM
00035        PERL_SYS_TERM();
00036 #endif
00037 
00038        ldap_pvt_thread_mutex_destroy( &perl_interpreter_mutex );      
00039 
00040        return 0;
00041 }
00042 
00043 int
00044 perl_back_db_destroy(
00045        BackendDB *be,
00046        ConfigReply *cr
00047 )
00048 {
00049        PerlBackend *pb = be->be_private;
00050 
00051        ch_free( pb->pb_module_name );
00052        ber_bvarray_free( pb->pb_module_path );
00053        ber_bvarray_free( pb->pb_module_config );
00054 
00055        free( be->be_private );
00056        be->be_private = NULL;
00057 
00058        return 0;
00059 }