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();
it != m_rules.end();
) {
if ((*it)->discardTemporary(false)) {
Rules *rules = (*it);
if ((*it)->discardTemporary(false)) { // deletes (*it)
it = m_rules.erase(it);
delete rules;
} else {
if ((*it)->isTemporary())
has_temporary = true;