summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-15 20:35:52 +0000
committerrubidium <rubidium@openttd.org>2009-04-15 20:35:52 +0000
commit3061d70387f48a4687688b8dc8fa6e34f4a80b85 (patch)
treeb2001d6443ccf388b033c79fc218cb8511ed3a89 /src/network
parentaecddf5cbe5c3e1502f8f2fb3d3ac328c09ab552 (diff)
downloadopenttd-3061d70387f48a4687688b8dc8fa6e34f4a80b85.tar.xz
(svn r16064) -Fix: memory leak when querying a server multiple times.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_gamelist.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/network_gamelist.cpp b/src/network/network_gamelist.cpp
index 4e96ad019..71f8be968 100644
--- a/src/network/network_gamelist.cpp
+++ b/src/network/network_gamelist.cpp
@@ -44,6 +44,7 @@ static void NetworkGameListHandleDelayedInsert()
NetworkGameList *item = NetworkGameListAddItem(ins_item->address);
if (item != NULL) {
+ ClearGRFConfigList(&item->info.grfconfig);
if (StrEmpty(item->info.server_name)) {
memset(&item->info, 0, sizeof(item->info));
strecpy(item->info.server_name, ins_item->info.server_name, lastof(item->info.server_name));