From 5b8dbf839ba8f586e2823744dc695acf57480c5f Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Tue, 2 Sep 2008 12:06:08 +0000 Subject: [PATCH] plug memleak: destroy internal buffer git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55632 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/raw_ostream.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h index 69cc43ef27c..5ab0988d3ee 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 -- 2.34.1