forked from OSchip/llvm-project
Leak fix: delete old objects before reallocation in an assignment operator!
llvm-svn: 7055
This commit is contained in:
parent
1fce4cfa95
commit
9a8f8e3e95
|
@ -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