修复了环形链表释放段错误的问题
This commit is contained in:
parent
4532f0f2eb
commit
d198abc33d
|
@ -63,6 +63,9 @@ void FreeRails(rail_node_t *head)
|
||||||
{
|
{
|
||||||
rail_node_t *p = head;
|
rail_node_t *p = head;
|
||||||
|
|
||||||
|
// 断开头尾节点
|
||||||
|
head->last_node->next_node = NULL;
|
||||||
|
|
||||||
while (p != NULL)
|
while (p != NULL)
|
||||||
{
|
{
|
||||||
rail_node_t *temp = p;
|
rail_node_t *temp = p;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user