Commit 1b461bea authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Valgrind: Fix memory leak

Detected by valgrind :)

Change-Id: I4e6b9cb1980cce82170e3f6c2e7cb541dd838d5e
Reviewed-by: default avatarChristian Kandeler <>
Reviewed-by: default avatarNikolai Kosjar <>
parent a4a4f7a4
......@@ -159,9 +159,12 @@ ValgrindConfigWidget::ValgrindConfigWidget(ValgrindBaseSettings *settings,
if (!global) {
// In project settings we want a flat vertical list.
QVBoxLayout *l = new QVBoxLayout;
while (layout()->count())
if (QWidget *w = layout()->takeAt(0)->widget())
while (layout()->count()) {
QLayoutItem *item = layout()->takeAt(0);
if (QWidget *w = item->widget())
delete item;
delete layout();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment