diff options
author | Muhammad Zahalqa <m@tryfinally.com> | 2020-08-08 14:57:03 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-09 21:10:01 +0200 |
commit | 0246e2ae6c881d4295a70f7b7f8c3a2cccfc1f1c (patch) | |
tree | de9d33de6e4353bf02887525a63cd5362ad72182 /Libraries/LibCore | |
parent | 5ae2f6e9ec077432dc56d5cb8fc5c26c5cca8517 (diff) | |
download | serenity-0246e2ae6c881d4295a70f7b7f8c3a2cccfc1f1c.zip |
LibCore: close socket on UDPServer dtor
Diffstat (limited to 'Libraries/LibCore')
-rw-r--r-- | Libraries/LibCore/UDPServer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibCore/UDPServer.cpp b/Libraries/LibCore/UDPServer.cpp index 462ce5f983..2b5b466074 100644 --- a/Libraries/LibCore/UDPServer.cpp +++ b/Libraries/LibCore/UDPServer.cpp @@ -30,6 +30,7 @@ #include <LibCore/UDPServer.h> #include <LibCore/UDPSocket.h> #include <stdio.h> +#include <unistd.h> #ifndef SOCK_NONBLOCK # include <sys/ioctl.h> @@ -53,6 +54,7 @@ UDPServer::UDPServer(Object* parent) UDPServer::~UDPServer() { + ::close(m_fd); } bool UDPServer::bind(const IPv4Address& address, u16 port) |