Skip to content
This repository was archived by the owner on Sep 27, 2024. It is now read-only.

Commit 75ffc6b

Browse files
author
Wesley Ceraso Prudencio
committed
Fixes memory leak as TailoringScreen is never deleted
Signed-off-by: Wesley Ceraso Prudencio <[email protected]>
1 parent 8456c52 commit 75ffc6b

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

src/MainWindow.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,7 @@ TailoringWindow* MainWindow::editProfile(bool newProfile)
13101310
struct xccdf_benchmark* benchmark = xccdf_policy_model_get_benchmark(policyModel);
13111311

13121312
TailoringWindow* ret = new TailoringWindow(policy, benchmark, newProfile, this);
1313+
ret->setAttribute(Qt::WA_DeleteOnClose, true);
13131314
#ifndef _WIN32
13141315
// disabling MainWindow on Windows causes workbench to hang
13151316
setEnabled(false);

src/TailoringWindow.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ TailoringWindow::TailoringWindow(struct xccdf_policy* policy, struct xccdf_bench
230230

231231
TailoringWindow::~TailoringWindow()
232232
{
233-
delete mQSettings;
234233
}
235234

236235
inline bool getXccdfItemInternalSelected(struct xccdf_policy* policy, struct xccdf_item* item)

0 commit comments

Comments
 (0)