mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-16 00:18:06 +00:00
Remove a memory leak, until ParamAttrsList is uniqued.
llvm-svn: 35823
This commit is contained in:
parent
e038420dc6
commit
1acc089771
@ -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)];
|
||||
|
Loading…
x
Reference in New Issue
Block a user