Beispiel #1
0
/*
 *	Check whether the object is a port if so, free it.  But
 *	keep track of that fact.
 */
void
io_free(
	unsigned int	otype,
	ipc_object_t	object)
{
	ipc_port_t	port;

	if (otype == IOT_PORT) {
		port = (ipc_port_t) object;
		ipc_port_finalize(port);
	}
	io_lock_destroy(object);
	zfree(ipc_object_zones[otype], object);
}
Beispiel #2
0
/*
 *	Check whether the object is a port if so, free it.  But
 *	keep track of that fact.
 */
void
io_free(
	unsigned int	otype,
	ipc_object_t	object)
{
	ipc_port_t	port;

	if (otype == IOT_PORT) {
		port = (ipc_port_t) object;
#if	MACH_ASSERT
		ipc_port_track_dealloc(port);
#endif	/* MACH_ASSERT */

#if CONFIG_MACF_MACH
		/* Port label should have been initialized after creation. */
		mac_port_label_destroy(&port->ip_label);
#endif	  
	}
	io_lock_destroy(object);
	zfree(ipc_object_zones[otype], object);
}