[llvm] r207265 - BugPoint: Fix some memory leaks.
David Blaikie
dblaikie at gmail.com
Fri Apr 25 13:15:17 PDT 2014
Author: dblaikie
Date: Fri Apr 25 15:15:16 2014
New Revision: 207265
URL: http://llvm.org/viewvc/llvm-project?rev=207265&view=rev
Log:
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.
Modified:
llvm/trunk/tools/bugpoint/BugDriver.cpp
Modified: llvm/trunk/tools/bugpoint/BugDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/BugDriver.cpp?rev=207265&r1=207264&r2=207265&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/BugDriver.cpp (original)
+++ llvm/trunk/tools/bugpoint/BugDriver.cpp Fri Apr 25 15:15:16 2014
@@ -76,6 +76,10 @@ BugDriver::BugDriver(const char *toolnam
BugDriver::~BugDriver() {
delete Program;
+ if (Interpreter != SafeInterpreter)
+ delete Interpreter;
+ delete SafeInterpreter;
+ delete gcc;
}
More information about the llvm-commits
mailing list