From 222b838e538fe115019f23a0e210454328394d4d Mon Sep 17 00:00:00 2001 From: Darius Drake Date: Fri, 8 Dec 2023 19:57:44 -0400 Subject: [PATCH] Updated: fixed memory leak --- serpent.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/serpent.c b/serpent.c index c9ec049..cd55647 100644 --- a/serpent.c +++ b/serpent.c @@ -507,7 +507,9 @@ void run() { switch (choice) { case '1': if (!isAlive) { + cleanup(); snake = startSnake(); + apple = startApple(); isAlive = true; speed = minSpeed; }