diff options
author | rubidium <rubidium@openttd.org> | 2010-02-09 23:49:19 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-02-09 23:49:19 +0000 |
commit | ab35d95b5af18dc31484281f44dd1c2cafb72390 (patch) | |
tree | 9d2396483adc97fa4375ccf6516ef78d069780eb /src/network/core | |
parent | 3c9c2f704fc9936d3c979787043493770e1fb22b (diff) | |
download | openttd-ab35d95b5af18dc31484281f44dd1c2cafb72390.tar.xz |
(svn r19072) -Fix [FS#3599]: possible read/write after free when the client triggered the server to close the connection
Diffstat (limited to 'src/network/core')
-rw-r--r-- | src/network/core/tcp_game.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/core/tcp_game.cpp b/src/network/core/tcp_game.cpp index 24a4726ef..8044ef138 100644 --- a/src/network/core/tcp_game.cpp +++ b/src/network/core/tcp_game.cpp @@ -67,8 +67,7 @@ NetworkRecvStatus NetworkClientSocket::CloseConnection(bool error) return NETWORK_RECV_STATUS_CONN_LOST; } - NetworkCloseClient(this, error); - return NETWORK_RECV_STATUS_OKAY; + return NetworkCloseClient(this, error ? NETWORK_RECV_STATUS_SERVER_ERROR : NETWORK_RECV_STATUS_CONN_LOST); } #endif /* ENABLE_NETWORK */ |