Beispiel #1
0
void
tlx_fini(void)
{
	if (conn_ind_pool != NULL) {
		uu_list_pool_destroy(conn_ind_pool);
		conn_ind_pool = NULL;
	}
}
Beispiel #2
0
void
config_fini(void)
{
	if (rep_handle == NULL)
		return;

	if (proto_info_pool != NULL) {
		uu_list_pool_destroy(proto_info_pool);
		proto_info_pool = NULL;
	}

	(void) scf_handle_unbind(rep_handle);
	scf_handle_destroy(rep_handle);
	rep_handle = NULL;
}
Beispiel #3
0
/*
 * Release any memory associated with a changelist.
 */
void
changelist_free(prop_changelist_t *clp)
{
	prop_changenode_t *cn;
	void *cookie;

	if (clp->cl_list) {
		cookie = NULL;
		while ((cn = uu_list_teardown(clp->cl_list, &cookie)) != NULL) {
			zfs_close(cn->cn_handle);
			free(cn);
		}

		uu_list_destroy(clp->cl_list);
	}
	if (clp->cl_pool)
		uu_list_pool_destroy(clp->cl_pool);

	free(clp);
}
Beispiel #4
0
/*
 * Tear-down structures created in method_init().
 */
void
method_fini(void)
{
	if (method_list != NULL) {
		method_el_t *me;

		while ((me = uu_list_first(method_list)) != NULL)
			unregister_method(me);

		(void) uu_list_destroy(method_list);
		method_list = NULL;
	}
	if (method_pool != NULL) {
		(void) uu_list_pool_destroy(method_pool);
		method_pool = NULL;
	}

	/* revert file limit */
	method_preexec();
}