mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-24 12:20:00 +00:00
Leak fix: delete old objects before reallocation in an assignment operator!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7055 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
65b2f401af
commit
daee2b492f
@ -190,6 +190,8 @@ public:
|
||||
}
|
||||
|
||||
const MachineOperand &operator=(const MachineOperand &MO) {
|
||||
if (isExternalSymbol()) // if old operand had a symbol name,
|
||||
delete SymbolName; // release old memory
|
||||
immedVal = MO.immedVal;
|
||||
flags = MO.flags;
|
||||
opType = MO.opType;
|
||||
|
Loading…
Reference in New Issue
Block a user