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