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.

llvm-svn: 207265
This commit is contained in:
David Blaikie 2014-04-25 20:15:16 +00:00
parent 0eb13ce85a
commit 37436ed485
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}