Correctly destroy startup resume data storage

PR #17930.
This commit is contained in:
Vladimir Golovnev 2022-10-25 11:37:51 +03:00 committed by GitHub
parent 14e4bc7eea
commit bb2caabd61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1387,7 +1387,7 @@ void SessionImpl::endStartup(ResumeSessionContext *context)
saveTorrentsQueue(); saveTorrentsQueue();
const Path dbPath = context->startupStorage->path(); const Path dbPath = context->startupStorage->path();
delete context->startupStorage; context->startupStorage->deleteLater();
if (context->currentStorageType == ResumeDataStorageType::Legacy) if (context->currentStorageType == ResumeDataStorageType::Legacy)
Utils::Fs::removeFile(dbPath); Utils::Fs::removeFile(dbPath);