From 8949464ed671d49477fd70b850e70945fed3d64c Mon Sep 17 00:00:00 2001 From: PKEuS Date: Sat, 31 Mar 2012 15:03:11 +0200 Subject: [PATCH] Fixed another memory leak in executionpath.cpp --- lib/executionpath.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/executionpath.cpp b/lib/executionpath.cpp index 120a29d40..8b9f35cae 100644 --- a/lib/executionpath.cpp +++ b/lib/executionpath.cpp @@ -241,9 +241,10 @@ void ExecutionPath::checkScope(const Token *tok, std::list &che // it is not certain that a for/while will be executed: for (std::list::iterator it = checks.begin(); it != checks.end();) { - if ((*it)->numberOfIf > 0) + if ((*it)->numberOfIf > 0) { + delete *it; checks.erase(it++); - else + } else ++it; }