plug memleak: destroy internal buffer
authorNuno Lopes <nunoplopes@sapo.pt>
Tue, 2 Sep 2008 12:06:08 +0000 (12:06 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Tue, 2 Sep 2008 12:06:08 +0000 (12:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55632 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/raw_ostream.h

index 69cc43ef27c26250ae78f89c6144145266f6d59d..5ab0988d3eea107831ca562a44e95fb862132fb7 100644 (file)
@@ -37,7 +37,10 @@ public:
     // Start out ready to flush.
     OutBufStart = OutBufEnd = OutBufCur = 0;
   }
-  virtual ~raw_ostream() {}
+
+  virtual ~raw_ostream() {
+    delete [] OutBufStart;
+  }
   
   //===--------------------------------------------------------------------===//
   // Configuration Interface