aboutsummaryrefslogtreecommitdiff
path: root/lib/Rewrite/RewriteRope.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-10-20 06:31:34 +0000
committerTed Kremenek <kremenek@apple.com>2009-10-20 06:31:34 +0000
commit90556e369d7d4364a1ee3924316f729bcbda24e5 (patch)
tree6c782012786bf399b1229a6159f50c90f0830cf9 /lib/Rewrite/RewriteRope.cpp
parent6cd219879ffce00920189ec1dcea927a42602961 (diff)
Call 'clear()' in ~RopePieceBTreeLeaf(), decrementing the reference
counts of the bufffers referened by the RopePieces in RopePieceBTreeLeaf. This (I believe) corrently fixes the leak I meant to fix in r84601 (which ended up causing an overrelease). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84615 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/RewriteRope.cpp')
-rw-r--r--lib/Rewrite/RewriteRope.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Rewrite/RewriteRope.cpp b/lib/Rewrite/RewriteRope.cpp
index 30bbcfafb5..fdb6fc385b 100644
--- a/lib/Rewrite/RewriteRope.cpp
+++ b/lib/Rewrite/RewriteRope.cpp
@@ -154,6 +154,7 @@ namespace {
~RopePieceBTreeLeaf() {
if (PrevLeaf || NextLeaf)
removeFromLeafInOrder();
+ clear();
}
bool isFull() const { return NumPieces == 2*WidthFactor; }