There are so many to choose from. Here is one I just thought up:
void free_circularly_linked_list(struct node *head) {
struct node *tmp = head;
do {
struct node *next = tmp->next;
free(tmp);
tmp = next;
} while (tmp != head);
}
Can you spot the undefined behavior?