revert wrong leak fix, caused double free
BUG: 320439 FIXED-IN: 4.11 REVIEW: 110754
This commit is contained in:
parent
6f5f999c54
commit
abaf6faae1
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue