summaryrefslogtreecommitdiffstats
path: root/Source/cmServer.cxx
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2017-07-23 17:54:42 (GMT)
committerBrad King <brad.king@kitware.com>2017-08-31 19:35:03 (GMT)
commit1a50cd8c683413154a700bf4ef17e621e8e89d7a (patch)
tree18dd368ba5ccc05876e7ca57f953872b22594891 /Source/cmServer.cxx
parent546a58746967d10996075ca47a7198c1c375fdb2 (diff)
downloadCMake-1a50cd8c683413154a700bf4ef17e621e8e89d7a.zip
CMake-1a50cd8c683413154a700bf4ef17e621e8e89d7a.tar.gz
CMake-1a50cd8c683413154a700bf4ef17e621e8e89d7a.tar.bz2
server: Fixed minor memory leaks
Diffstat (limited to 'Source/cmServer.cxx')
-rw-r--r--Source/cmServer.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/Source/cmServer.cxx b/Source/cmServer.cxx
index f14e755..2638ec2 100644
--- a/Source/cmServer.cxx
+++ b/Source/cmServer.cxx
@@ -57,10 +57,6 @@ cmServer::cmServer(cmConnection* conn, bool supportExperimental)
cmServer::~cmServer()
{
- if (!this->Protocol) { // Server was never fully started!
- return;
- }
-
for (cmServerProtocol* p : this->SupportedProtocols) {
delete p;
}
@@ -110,6 +106,7 @@ void cmServer::ProcessRequest(cmConnection* connection,
void cmServer::RegisterProtocol(cmServerProtocol* protocol)
{
if (protocol->IsExperimental() && !this->SupportExperimental) {
+ delete protocol;
return;
}
auto version = protocol->ProtocolVersion();