[Freeciv-Dev] Re: (PR#6650) memory leak in remove_city
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Jason Short wrote:
> The mystrdup in remove_city() in citytools.c is not fully matched by a
> free() call.
Patch attached.
jason
Index: server/citytools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/citytools.c,v
retrieving revision 1.237
diff -u -r1.237 citytools.c
--- server/citytools.c 2003/10/13 01:33:31 1.237
+++ server/citytools.c 2003/10/27 20:50:40
@@ -1202,8 +1202,9 @@
savepalace is on. */
if (had_palace && game.savepalace) {
build_free_palace(pplayer, city_name);
- free(city_name);
}
+
+ free(city_name);
sync_cities();
}
|
|