[llvm] 1bed03b - Fix memory leak in D demangler
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 9 16:08:55 PST 2021
Author: David Blaikie
Date: 2021-11-09T16:08:14-08:00
New Revision: 1bed03b5e3812dc6c659d285d77a2a577a2d113d
URL: https://github.com/llvm/llvm-project/commit/1bed03b5e3812dc6c659d285d77a2a577a2d113d
DIFF: https://github.com/llvm/llvm-project/commit/1bed03b5e3812dc6c659d285d77a2a577a2d113d.diff
LOG: Fix memory leak in D demangler
Added:
Modified:
llvm/lib/Demangle/DLangDemangle.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Demangle/DLangDemangle.cpp b/llvm/lib/Demangle/DLangDemangle.cpp
index d6e8fe97982be..d2f1bf4323ee5 100644
--- a/llvm/lib/Demangle/DLangDemangle.cpp
+++ b/llvm/lib/Demangle/DLangDemangle.cpp
@@ -40,5 +40,6 @@ char *llvm::dlangDemangle(const char *MangledName) {
return Demangled.getBuffer();
}
+ free(Demangled.getBuffer());
return nullptr;
}
More information about the llvm-commits
mailing list