summaryrefslogtreecommitdiff
path: root/Libraries/LibCore
diff options
context:
space:
mode:
authorMuhammad Zahalqa <m@tryfinally.com>2020-08-08 15:54:22 +0300
committerAndreas Kling <kling@serenityos.org>2020-08-09 21:10:01 +0200
commitd9470bdae763e18291875d1e55dfdc2e608595c0 (patch)
treed0e77f5debc82c09a3e84f12e51b3f7011cf05a9 /Libraries/LibCore
parent9150f3c266b688bf04c5ca861fe8934cefee25f8 (diff)
downloadserenity-d9470bdae763e18291875d1e55dfdc2e608595c0.zip
LibCore: close socket on LocalServer dtor
Diffstat (limited to 'Libraries/LibCore')
-rw-r--r--Libraries/LibCore/LocalServer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibCore/LocalServer.cpp b/Libraries/LibCore/LocalServer.cpp
index 93b11f1f4b..ceadadfdb3 100644
--- a/Libraries/LibCore/LocalServer.cpp
+++ b/Libraries/LibCore/LocalServer.cpp
@@ -45,6 +45,8 @@ LocalServer::LocalServer(Object* parent)
LocalServer::~LocalServer()
{
+ if (m_fd >= 0)
+ ::close(m_fd);
}
bool LocalServer::take_over_from_system_server()