Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2004:
[Freeciv-Dev] (PR#11465) memory leak: cm state is never freed
Home

[Freeciv-Dev] (PR#11465) memory leak: cm state is never freed

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#11465) memory leak: cm state is never freed
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 11 Dec 2004 20:34:06 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11465 >

Here's a patch.  However there seem to be more leaks.

-jason

Index: common/aicore/cm.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/aicore/cm.c,v
retrieving revision 1.43.2.1
diff -u -r1.43.2.1 cm.c
--- common/aicore/cm.c  19 Nov 2004 03:44:40 -0000      1.43.2.1
+++ common/aicore/cm.c  12 Dec 2004 04:32:39 -0000
@@ -1789,6 +1789,7 @@
   destroy_partial_solution(&state->best);
   destroy_partial_solution(&state->current);
   free(state->choice.stack);
+  free(state);
 }
 
 

[Prev in Thread] Current Thread [Next in Thread]