[Freeciv-Dev] (PR#4696) Memory leak in nation.c
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#4696) Memory leak in nation.c |
From: |
"mateusz stefek" <matusik_s@xxxxx> |
Date: |
Sat, 26 Jul 2003 00:09:28 -0700 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
Nations' classes and legends aren't freed after disconnecting from the
server.
This patch adds missing free()'s into nation.c
--
mateusz
--- freeorig/common/nation.c 2003-04-05 08:06:54.000000000 +0200
+++ freeciv/common/nation.c 2003-07-25 20:43:45.000000000 +0200
@@ -215,6 +215,16 @@
free(p->leaders);
p->leaders = NULL;
}
+
+ if (p->class) {
+ free(p->class);
+ p->class = NULL;
+ }
+
+ if (p->legend) {
+ free(p->legend);
+ p->legend = NULL;
+ }
nation_city_names_free(p->city_names);
p->city_names = NULL;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#4696) Memory leak in nation.c,
mateusz stefek <=
|
|