summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2017-12-05 23:22:47 +0100
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-12-06 02:23:47 +0100
commit4816ca43bb00f1252f351e35f2d94603d9f63dfe (patch)
tree6415a88e070e14997c3a0c32bde7964ec77e0929
parent0964d1a9b0d39c403adc50ad29aec5e263cc7466 (diff)
downloadsubsurface-4816ca43bb00f1252f351e35f2d94603d9f63dfe.tar.gz
Allocate CheckCloudConnection object on stack
Fixes a memory leak: CheckCloudConnection was allocated on the heap, but never deleted. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r--core/checkcloudconnection.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/checkcloudconnection.cpp b/core/checkcloudconnection.cpp
index 69f2b9a6d..f3e064c16 100644
--- a/core/checkcloudconnection.cpp
+++ b/core/checkcloudconnection.cpp
@@ -103,6 +103,5 @@ extern "C" bool canReachCloudServer()
{
if (verbose)
qWarning() << "Cloud storage: checking connection to cloud server";
- CheckCloudConnection *checker = new CheckCloudConnection;
- return checker->checkServer();
+ return CheckCloudConnection().checkServer();
}