From 90078e4038b28305e4e616259860200c4dcaa9d0 Mon Sep 17 00:00:00 2001 From: Juraj Oravec Date: Sat, 14 Dec 2024 12:47:08 +0100 Subject: [PATCH] Do not use "createSettings" in database updater There is a potential memory leak. Signed-off-by: Juraj Oravec --- src/lib/app/profilemanager.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib/app/profilemanager.cpp b/src/lib/app/profilemanager.cpp index 1c1e3f069..aa083c0f8 100644 --- a/src/lib/app/profilemanager.cpp +++ b/src/lib/app/profilemanager.cpp @@ -403,11 +403,7 @@ void ProfileManager::updateDatabase() }; QHash siteSettings; - /* Copied from mainapplication.cpp */ - Settings::createSettings(DataPaths::currentProfilePath() + QLatin1String("/settings.ini")); - /* End of copied code */ - - Settings settings; + QSettings settings(DataPaths::currentProfilePath() + QLatin1String("/settings.ini"), QSettings::IniFormat); /* HTML5 permissions */ settings.beginGroup(QSL("HTML5Notifications"));