FreeBSD/sys/security/audit/audit_pipe.c
/*
 * Free an audit pipe; this means freeing all preselection state and all
 * records in the pipe.  Assumes global write lock and pipe mutex are held to
 * prevent any new records from being inserted during the free, and that the
 * audit pipe is still on the global list.
 */
Free an audit pipe; this means freeing all preselection state and all
records in the pipe.  Assumes global write lock and pipe mutex are held to
prevent any new records from being inserted during the free, and that the
audit pipe is still on the global list.
Free an audit pipe ; this means freeing all preselection state and all records in the pipe . Assumes global write lock and pipe mutex are held to prevent any new records from being inserted during the free and that the audit pipe is still on the global list .
static void
audit_pipe_free(struct audit_pipe *ap)
{
	AUDIT_PIPE_LIST_WLOCK_ASSERT();
	AUDIT_PIPE_LOCK_ASSERT(ap);
	audit_pipe_preselect_flush_locked(ap);
	audit_pipe_flush(ap);
	cv_destroy(&ap->ap_cv);
	AUDIT_PIPE_SX_LOCK_DESTROY(ap);
	AUDIT_PIPE_LOCK_DESTROY(ap);
	seldrain(&ap->ap_selinfo);
	knlist_destroy(&ap->ap_selinfo.si_note);
	TAILQ_REMOVE(&audit_pipe_list, ap, ap_list);
	free(ap, M_AUDIT_PIPE);
	audit_pipe_count--;
}
static void audit_pipe_free ( struct audit_pipe * ap ) { AUDIT_PIPE_LIST_WLOCK_ASSERT ( ) ; AUDIT_PIPE_LOCK_ASSERT ( ap ) ; audit_pipe_preselect_flush_locked ( ap ) ; audit_pipe_flush ( ap ) ; cv_destroy ( & ap -> ap_cv ) ; AUDIT_PIPE_SX_LOCK_DESTROY ( ap ) ; AUDIT_PIPE_LOCK_DESTROY ( ap ) ; seldrain ( & ap -> ap_selinfo ) ; knlist_destroy ( & ap -> ap_selinfo . si_note ) ; TAILQ_REMOVE ( & audit_pipe_list , ap , ap_list ) ; free ( ap , M_AUDIT_PIPE ) ; audit_pipe_count -- ; }
Free an audit pipe; this means freeing all preselection state and all
 records in the pipe.
Free an audit pipe ; this means freeing all preselection state and all records in the pipe .