summaryrefslogtreecommitdiff
path: root/tools/bugpoint
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-25 20:15:16 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-25 20:15:16 +0000
commit5ed33e08f30b85c0f6e079fc31cc552a4b06f61e (patch)
treef67bea3f86e3795506bf9ed57f9abcdc7712a1db /tools/bugpoint
parent9c6a820aa7169f64b2def69af1312354c07aff2a (diff)
downloadllvm-5ed33e08f30b85c0f6e079fc31cc552a4b06f61e.tar.gz
llvm-5ed33e08f30b85c0f6e079fc31cc552a4b06f61e.tar.bz2
llvm-5ed33e08f30b85c0f6e079fc31cc552a4b06f61e.tar.xz
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
Diffstat (limited to 'tools/bugpoint')
-rw-r--r--tools/bugpoint/BugDriver.cpp4
1 files changed, 4 insertions, 0 deletions
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;
}