From abaf6faae1a9ee72a6569ff37179ea7dcef9adaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Fri, 31 May 2013 19:14:34 +0200 Subject: [PATCH] revert wrong leak fix, caused double free BUG: 320439 FIXED-IN: 4.11 REVIEW: 110754 --- rules.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rules.cpp b/rules.cpp index b7e163b664..9244d06d38 100644 --- a/rules.cpp +++ b/rules.cpp @@ -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;