From 948c2657d6f04ee38dfae57b4e31e0c577927731 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 4 Aug 2019 22:00:42 +0200 Subject: [PATCH] CSocket: Close the underlying socket on destruction Otherwise we leak the file descriptor. --- Libraries/LibCore/CSocket.cpp | 1 + 1 file changed, 1 insertion(+) 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)