From ac908110eda6314087e29d2f7fe88cdd7a56c36a Mon Sep 17 00:00:00 2001 From: John Shepherd Date: Thu, 10 Sep 2020 15:24:07 -0700 Subject: [PATCH 1/2] Delete socket Signed-off-by: John Shepherd --- src/NodeShared.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/NodeShared.cc b/src/NodeShared.cc index 3b63bd14f..21857cd61 100644 --- a/src/NodeShared.cc +++ b/src/NodeShared.cc @@ -1761,6 +1761,7 @@ void NodeSharedPrivate::AccessControlHandler() } sock->close(); + delete sock; } ///////////////////////////////////////////////// From 6b75dadca888b46c0c613789b811a2d7974ddb66 Mon Sep 17 00:00:00 2001 From: John Shepherd Date: Thu, 10 Sep 2020 15:27:46 -0700 Subject: [PATCH 2/2] add extra delete and close Signed-off-by: John Shepherd --- src/NodeShared.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/NodeShared.cc b/src/NodeShared.cc index 21857cd61..cbb19c2a4 100644 --- a/src/NodeShared.cc +++ b/src/NodeShared.cc @@ -1636,6 +1636,8 @@ void NodeSharedPrivate::AccessControlHandler() { std::cerr << "Username and password not set. " << "Authentication is disabled\n"; + sock->close(); + delete sock; return; }