1
0
Fork 0
mirror of https://github.com/subsurface/subsurface.git synced 2025-02-19 22:16:15 +00:00

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>
This commit is contained in:
Berthold Stoeger 2017-12-05 23:22:47 +01:00 committed by Lubomir I. Ivanov
parent 0964d1a9b0
commit 4816ca43bb

View file

@ -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();
}