summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Demangle/MicrosoftDemangle.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2018-07-23 18:21:43 +0000
committerReid Kleckner <rnk@google.com>2018-07-23 18:21:43 +0000
commitdbae8cdb89bc876b1c56a051d90ab3dbd4732663 (patch)
tree5f21385e4f8d47697d185fef1d6bf54c41329804 /llvm/lib/Demangle/MicrosoftDemangle.cpp
parente5bf4892919341cb37088e069c6d0c4dcdb6b542 (diff)
downloadbcm5719-llvm-dbae8cdb89bc876b1c56a051d90ab3dbd4732663.tar.gz
bcm5719-llvm-dbae8cdb89bc876b1c56a051d90ab3dbd4732663.zip
[Demangle] Attempt to fix arena memory leak
llvm-svn: 337720
Diffstat (limited to 'llvm/lib/Demangle/MicrosoftDemangle.cpp')
-rw-r--r--llvm/lib/Demangle/MicrosoftDemangle.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Demangle/MicrosoftDemangle.cpp b/llvm/lib/Demangle/MicrosoftDemangle.cpp
index c89f0cf80b7..a89ced25baa 100644
--- a/llvm/lib/Demangle/MicrosoftDemangle.cpp
+++ b/llvm/lib/Demangle/MicrosoftDemangle.cpp
@@ -42,7 +42,9 @@ public:
while (Head) {
assert(Head->Buf);
delete[] Head->Buf;
- Head = Head->Next;
+ AllocatorNode *Next = Head->Next;
+ delete Head;
+ Head = Next;
}
}
OpenPOWER on IntegriCloud