diff options
author | Darkvater <darkvater@openttd.org> | 2006-01-29 18:04:52 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-01-29 18:04:52 +0000 |
commit | 20538e9b403349039345369f56b9325704980046 (patch) | |
tree | 0e6121e798a4b72406aa61950fc145f5f4d10faa /network_gui.c | |
parent | 2de43319319a4434d28b71d976900b51e0ffe949 (diff) | |
download | openttd-20538e9b403349039345369f56b9325704980046.tar.xz |
(svn r3469) - Fix: plug a possible memleak with subsequential strdup's without freeing the previous value and make it possible to ban offline clients
Diffstat (limited to 'network_gui.c')
-rw-r--r-- | network_gui.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/network_gui.c b/network_gui.c index 1bc753930..80830fa00 100644 --- a/network_gui.c +++ b/network_gui.c @@ -1068,7 +1068,7 @@ static void ClientList_Ban(byte client_no) uint32 ip = NetworkFindClientInfo(client_no)->client_ip; for (i = 0; i < lengthof(_network_ban_list); i++) { - if (_network_ban_list[i] == NULL || _network_ban_list[i][0] == '\0') { + if (_network_ban_list[i] == NULL) { _network_ban_list[i] = strdup(inet_ntoa(*(struct in_addr *)&ip)); break; } |