forked from qt-creator/qt-creator
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 <tobias.hunger@digia.com>
This commit is contained in:
committed by
Daniel Teske
parent
fe2dd584fc
commit
75b090e619
@@ -116,6 +116,7 @@ bool DeployConfiguration::fromMap(const QVariantMap &map)
|
|||||||
return false;
|
return false;
|
||||||
QVariantMap data = map.value(QLatin1String(BUILD_STEP_LIST_PREFIX) + QLatin1String("0")).toMap();
|
QVariantMap data = map.value(QLatin1String(BUILD_STEP_LIST_PREFIX) + QLatin1String("0")).toMap();
|
||||||
if (!data.isEmpty()) {
|
if (!data.isEmpty()) {
|
||||||
|
delete m_stepList;
|
||||||
m_stepList = new BuildStepList(this, data);
|
m_stepList = new BuildStepList(this, data);
|
||||||
if (m_stepList->isNull()) {
|
if (m_stepList->isNull()) {
|
||||||
qWarning() << "Failed to restore deploy step list";
|
qWarning() << "Failed to restore deploy step list";
|
||||||
|
|||||||
Reference in New Issue
Block a user