2 * close.c - tcl close routines
4 * Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
6 * Redistribution and use in source and binary forms are permitted only
7 * as authorized by the OpenLDAP Public License. A copy of this
8 * license is available at http://www.OpenLDAP.org/license.html or
9 * in file LICENSE in the top-level directory of the distribution.
32 ldap_pvt_thread_mutex_destroy( &tcl_interpreter_mutex );
42 struct tclinfo *ti = (struct tclinfo *) bd->be_private;
43 struct i_info *ti_tmp;
46 if (!ti->ti_ii->count && strcasecmp("default", ti->ti_ii->name)) {
47 /* no more db's using this and it's not the default */
48 for(ti_tmp = global_i; ti_tmp->next != ti->ti_ii; ti_tmp = ti_tmp->next)
50 ti_tmp->next = ti->ti_ii->next;
54 free( bd->be_private );
55 bd->be_private = NULL;