diff --git a/cv9/snake.c b/cv9/snake.c index a214496..6b0e543 100644 --- a/cv9/snake.c +++ b/cv9/snake.c @@ -13,7 +13,7 @@ struct snake* remove_snake(struct snake* snake) { struct snake* head; struct snake* this = head; while (head!= NULL) { - head = head->next; + head = snake->next; free(this); } return snake;