From 21a2a91b3c3aedb070b6a9678b221793b1326deb Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 19 May 2011 19:31:51 +0200 Subject: [PATCH] executionpath: fix memory leak --- lib/executionpath.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/executionpath.cpp b/lib/executionpath.cpp index 774b9c28d..3b72bdbe5 100644 --- a/lib/executionpath.cpp +++ b/lib/executionpath.cpp @@ -114,6 +114,7 @@ static void parseIfSwitchBody(const Token * const tok, { if (c.back()->varId == 0) { + delete c.back(); c.pop_back(); continue; } @@ -131,6 +132,8 @@ static void parseIfSwitchBody(const Token * const tok, } if (!duplicate) newchecks.push_back(c.back()); + else + delete c.back(); c.pop_back(); }