From ab35d95b5af18dc31484281f44dd1c2cafb72390 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 9 Feb 2010 23:49:19 +0000 Subject: (svn r19072) -Fix [FS#3599]: possible read/write after free when the client triggered the server to close the connection --- src/network/core/tcp_game.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/network/core') 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 */ -- cgit v1.2.3-54-g00ecf