From 4816ca43bb00f1252f351e35f2d94603d9f63dfe Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 5 Dec 2017 23:22:47 +0100 Subject: Allocate CheckCloudConnection object on stack Fixes a memory leak: CheckCloudConnection was allocated on the heap, but never deleted. Signed-off-by: Berthold Stoeger --- core/checkcloudconnection.cpp | 3 +-- 1 file changed, 1 insertion(+), 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(); } -- cgit v1.2.3-70-g09d2