diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-08-04 22:00:42 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-08-04 22:02:25 +0200 |
commit | 948c2657d6f04ee38dfae57b4e31e0c577927731 (patch) | |
tree | c31a913c5f2bd11774e731dab9800839055c2f41 /Libraries | |
parent | e58b7343632f8b5bb0e03a436d9db5872084d236 (diff) | |
download | serenity-948c2657d6f04ee38dfae57b4e31e0c577927731.zip |
CSocket: Close the underlying socket on destruction
Otherwise we leak the file descriptor.
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibCore/CSocket.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibCore/CSocket.cpp b/Libraries/LibCore/CSocket.cpp index ca83b97be5..f9bfd1b3bf 100644 --- a/Libraries/LibCore/CSocket.cpp +++ b/Libraries/LibCore/CSocket.cpp @@ -18,6 +18,7 @@ CSocket::CSocket(Type type, CObject* parent) CSocket::~CSocket() { + close(); } bool CSocket::connect(const String& hostname, int port) |