summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Demangle/MicrosoftDemangle.cpp
diff options
context:
space:
mode:
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