From 75b090e619a255e84b61e5799ecac780e2228f58 Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Wed, 12 Sep 2012 18:05:12 +0200 Subject: [PATCH] DeployConfiguration: fix memory leak The ctor creates a m_stepList, which we need thus delete in fromMap. Likely the m_stepList could simply be initialized with null in the ctor. Change-Id: I3fdb31b135b4b6ea528e0666117b63c2b39764cf Reviewed-by: Tobias Hunger --- src/plugins/projectexplorer/deployconfiguration.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/projectexplorer/deployconfiguration.cpp b/src/plugins/projectexplorer/deployconfiguration.cpp index edb5e169868..2be157dd8cc 100644 --- a/src/plugins/projectexplorer/deployconfiguration.cpp +++ b/src/plugins/projectexplorer/deployconfiguration.cpp @@ -116,6 +116,7 @@ bool DeployConfiguration::fromMap(const QVariantMap &map) return false; QVariantMap data = map.value(QLatin1String(BUILD_STEP_LIST_PREFIX) + QLatin1String("0")).toMap(); if (!data.isEmpty()) { + delete m_stepList; m_stepList = new BuildStepList(this, data); if (m_stepList->isNull()) { qWarning() << "Failed to restore deploy step list";