diff options
author | Pixel <pixel@nobis-crew.org> | 2011-11-13 18:14:20 +0100 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-11-13 18:14:20 +0100 |
commit | fcc93c08f30dc71aa9f1803299c6328ff9d69169 (patch) | |
tree | 4d46125b2278e61e334fbde5cd685bc762714266 | |
parent | e6385cb74c35eb5a346237acecc846e52c4d6bd4 (diff) |
Securing double closes in Sockets.
-rw-r--r-- | src/Socket.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Socket.cc b/src/Socket.cc index ba528aa..4ef9942 100644 --- a/src/Socket.cc +++ b/src/Socket.cc @@ -280,6 +280,8 @@ Balau::Socket::Socket(int fd) : m_fd(fd), m_connected(true), m_connecting(false) } void Balau::Socket::close() throw (GeneralException) { + if (m_fd < 0) + return; #ifdef _WIN32 closesocket(m_fd); WSACleanup(); |