static void nodeDestruct(struct SaveNode* node)
{
    TR_ASSERT(node != NULL);

    if (node->sorted != NULL)
    {
        tr_free(node->sorted->val.l.vals);
        tr_free(node->sorted);
    }
}
Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code.