Fixed a small memory leak in the application updater

This commit is contained in:
Leon Styhre 2023-11-05 15:34:20 +01:00
parent 36fd1817e2
commit 5120f8b440
2 changed files with 6 additions and 0 deletions

View file

@ -59,8 +59,11 @@ ApplicationUpdater::~ApplicationUpdater()
{
// This is needed if getResults() was never called.
mApplicationShutdown = true;
if (mThread)
mThread->join();
HttpReq::cleanupCurlMulti();
}
ApplicationUpdater& ApplicationUpdater::getInstance()
@ -187,6 +190,7 @@ void ApplicationUpdater::update()
HttpReq::Status reqStatus {mRequest->status()};
if (reqStatus == HttpReq::REQ_SUCCESS) {
mStatus = ASYNC_DONE;
HttpReq::cleanupCurlMulti();
return;
}

View file

@ -227,6 +227,8 @@ GuiApplicationUpdater::~GuiApplicationUpdater()
if (mThread)
mThread->join();
HttpReq::cleanupCurlMulti();
}
void GuiApplicationUpdater::setDownloadPath()