diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2008-09-02 12:06:08 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2008-09-02 12:06:08 +0000 |
commit | 5b8dbf839ba8f586e2823744dc695acf57480c5f (patch) | |
tree | dd15575f2be1494c50b0938c32c9b50188f27ebb | |
parent | 6e95d90b4ce3e7545b8e8b4d0321261fb93b1a15 (diff) |
plug memleak: destroy internal buffer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55632 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Support/raw_ostream.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h index 69cc43ef27..5ab0988d3e 100644 --- a/include/llvm/Support/raw_ostream.h +++ b/include/llvm/Support/raw_ostream.h @@ -37,7 +37,10 @@ public: // Start out ready to flush. OutBufStart = OutBufEnd = OutBufCur = 0; } - virtual ~raw_ostream() {} + + virtual ~raw_ostream() { + delete [] OutBufStart; + } //===--------------------------------------------------------------------===// // Configuration Interface |