fix a memory leak
authorLaurent Mazet <mazet@softndesign.org>
Thu, 18 Jul 2024 20:22:28 +0000 (22:22 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Thu, 18 Jul 2024 20:22:28 +0000 (22:22 +0200)
checkers.c

index c5032b39bc0d7d24083521415aa06789722f2f7f..ed0812cd8547ae08ec49e68103b263ee80d96767 100644 (file)
@@ -412,6 +412,7 @@ int main (int argc, char *argv[])
         case '\b':
         case 'x':
             if (cache->board) {
+                freeboard (board);
                 board = popcache (cache, &xcursor, &ycursor, &queen);
                 if (mode == 2) {
                     mode = 1;