From: Oliver Kurth Date: Fri, 23 Mar 2018 22:05:35 +0000 (-0700) Subject: CAF changes for Windows; not applicable to open-vm-tools. X-Git-Tag: stable-10.3.0~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c4420178932c1879f402ece689e5cfaf5f37d84;p=thirdparty%2Fopen-vm-tools.git CAF changes for Windows; not applicable to open-vm-tools. --- diff --git a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMerge.cpp b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMerge.cpp index 5d6483f27..ff6ba4938 100644 --- a/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMerge.cpp +++ b/open-vm-tools/common-agent/Cpp/ManagementAgent/Subsystems/MaIntegration/src/CConfigEnvMerge.cpp @@ -2,7 +2,7 @@ * Author: bwilliams * Created: Oct 22, 2010 * - * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. -- VMware Confidential + * Copyright (C) 2010-2018 VMware, Inc. All rights reserved. -- VMware Confidential */ #include "stdafx.h" @@ -242,6 +242,10 @@ bool CConfigEnvMerge::isTunnelEnabledFunc() { } rc = (0 == ::connect(socketFd, (SOCKADDR*) &socketClient, sizeof(socketClient))); + + if (socketFd != INVALID_SOCKET) { + ::closesocket(socketFd); + } } CAF_CM_CATCH_CAF CAF_CM_CATCH_DEFAULT