[llvm] r337720 - [Demangle] Attempt to fix arena memory leak
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 23 11:21:43 PDT 2018
Author: rnk
Date: Mon Jul 23 11:21:43 2018
New Revision: 337720
URL: http://llvm.org/viewvc/llvm-project?rev=337720&view=rev
Log:
[Demangle] Attempt to fix arena memory leak
Modified:
llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp
Modified: llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp?rev=337720&r1=337719&r2=337720&view=diff
==============================================================================
--- llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp (original)
+++ llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp Mon Jul 23 11:21:43 2018
@@ -42,7 +42,9 @@ public:
while (Head) {
assert(Head->Buf);
delete[] Head->Buf;
- Head = Head->Next;
+ AllocatorNode *Next = Head->Next;
+ delete Head;
+ Head = Next;
}
}
More information about the llvm-commits
mailing list