revert wrong leak fix, caused double free

BUG: 320439
FIXED-IN: 4.11
REVIEW: 110754
This commit is contained in:
Thomas Lübking 2013-05-31 19:14:34 +02:00
parent 6f5f999c54
commit abaf6faae1

View file

@ -1031,10 +1031,8 @@ void RuleBook::cleanupTemporaryRules()
for (QList< Rules* >::Iterator it = m_rules.begin(); for (QList< Rules* >::Iterator it = m_rules.begin();
it != m_rules.end(); it != m_rules.end();
) { ) {
if ((*it)->discardTemporary(false)) { if ((*it)->discardTemporary(false)) { // deletes (*it)
Rules *rules = (*it);
it = m_rules.erase(it); it = m_rules.erase(it);
delete rules;
} else { } else {
if ((*it)->isTemporary()) if ((*it)->isTemporary())
has_temporary = true; has_temporary = true;