afterTriggerFreeEventList(AfterTriggerEventList *events)
{
	AfterTriggerEventChunk *chunk;
	AfterTriggerEventChunk *next_chunk;

	for (chunk = events->head; chunk != NULL; chunk = next_chunk)
	{
		next_chunk = chunk->next;
		pfree(chunk);
	}
	events->head = NULL;
	events->tail = NULL;
	events->tailfree = NULL;
}
afterTriggerFreeEventList(AfterTriggerEventList *events)
{
	AfterTriggerEventChunk *chunk;
	AfterTriggerEventChunk *next_chunk;

	for (chunk = events->head; chunk != NULL; chunk = next_chunk)
	{
		next_chunk = chunk->next;
		pfree(chunk);
	}
	events->head = NULL;
	events->tail = NULL;
	events->tailfree = NULL;
}