projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4522c8a
)
Remove a memory leak, until ParamAttrsList is uniqued.
author
Reid Spencer
<rspencer@reidspencer.com>
Mon, 9 Apr 2007 17:20:18 +0000
(17:20 +0000)
committer
Reid Spencer
<rspencer@reidspencer.com>
Mon, 9 Apr 2007 17:20:18 +0000
(17:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35823
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Type.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Type.cpp
b/lib/VMCore/Type.cpp
index 0e74f2e4f89b1d68accafcbaac9efee8b715f5ae..ace800dfb2b6bbec4b51db949a5489ffc7e0e574 100644
(file)
--- a/
lib/VMCore/Type.cpp
+++ b/
lib/VMCore/Type.cpp
@@
-1098,7
+1098,11
@@
FunctionType *FunctionType::get(const Type *ReturnType,
FunctionValType VT(ReturnType, Params, isVarArg, Attrs);
FunctionType *MT = FunctionTypes->get(VT);
- if (MT) return MT;
+ if (MT) {
+ delete Attrs; // not needed any more
+ return MT;
+ }
+
MT = (FunctionType*) new char[sizeof(FunctionType) +
sizeof(PATypeHandle)*(Params.size()+1)];