From 5ed33e08f30b85c0f6e079fc31cc552a4b06f61e Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 25 Apr 2014 20:15:16 +0000 Subject: BugPoint: Fix some memory leaks. Patch by Kostya Serebryany. unique_ptr would be nice, but it's a bit too much work for an area I'm not familiar with, nor invested in, unfortunately. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207265 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/bugpoint/BugDriver.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/bugpoint') diff --git a/tools/bugpoint/BugDriver.cpp b/tools/bugpoint/BugDriver.cpp index 043863a354..e4f66ed5b3 100644 --- a/tools/bugpoint/BugDriver.cpp +++ b/tools/bugpoint/BugDriver.cpp @@ -76,6 +76,10 @@ BugDriver::BugDriver(const char *toolname, bool find_bugs, BugDriver::~BugDriver() { delete Program; + if (Interpreter != SafeInterpreter) + delete Interpreter; + delete SafeInterpreter; + delete gcc; } -- cgit v1.2.3