[llvm-commits] [llvm] r110756 - /llvm/trunk/tools/lto/LTOModule.cpp
Daniel Dunbar
daniel at zuster.org
Tue Aug 10 17:11:17 PDT 2010
Author: ddunbar
Date: Tue Aug 10 19:11:17 2010
New Revision: 110756
URL: http://llvm.org/viewvc/llvm-project?rev=110756&view=rev
Log:
lto: Fix gratuitous memory leaks.
Modified:
llvm/trunk/tools/lto/LTOModule.cpp
Modified: llvm/trunk/tools/lto/LTOModule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOModule.cpp?rev=110756&r1=110755&r2=110756&view=diff
==============================================================================
--- llvm/trunk/tools/lto/LTOModule.cpp (original)
+++ llvm/trunk/tools/lto/LTOModule.cpp Tue Aug 10 19:11:17 2010
@@ -188,7 +188,7 @@
NameAndAttributes info;
if (_undefines.find(superclassName.c_str()) == _undefines.end()) {
const char *symbolName = ::strdup(superclassName.c_str());
- info.name = ::strdup(symbolName);
+ info.name = symbolName;
info.attributes = LTO_SYMBOL_DEFINITION_UNDEFINED;
// string is owned by _undefines
_undefines[info.name] = info;
@@ -220,7 +220,7 @@
NameAndAttributes info;
if (_undefines.find(targetclassName.c_str()) == _undefines.end()) {
const char *symbolName = ::strdup(targetclassName.c_str());
- info.name = ::strdup(symbolName);
+ info.name = symbolName;
info.attributes = LTO_SYMBOL_DEFINITION_UNDEFINED;
// string is owned by _undefines
_undefines[info.name] = info;
@@ -237,7 +237,7 @@
NameAndAttributes info;
if (_undefines.find(targetclassName.c_str()) == _undefines.end()) {
const char *symbolName = ::strdup(targetclassName.c_str());
- info.name = ::strdup(symbolName);
+ info.name = symbolName;
info.attributes = LTO_SYMBOL_DEFINITION_UNDEFINED;
// string is owned by _undefines
_undefines[info.name] = info;
More information about the llvm-commits
mailing list