diff --git a/cv9/snake.c b/cv9/snake.c index 5f32908..91b4fc4 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; if (this!= NULL) { - this = this->next; + this = snake->next; free(this); } return snake;