修复了环形链表释放段错误的问题

This commit is contained in:
jackfiled 2022-05-29 21:17:39 +08:00
parent 4532f0f2eb
commit d198abc33d

View File

@ -63,6 +63,9 @@ void FreeRails(rail_node_t *head)
{
rail_node_t *p = head;
// 断开头尾节点
head->last_node->next_node = NULL;
while (p != NULL)
{
rail_node_t *temp = p;