Leak fix: delete old objects before reallocation in an assignment operator!

llvm-svn: 7055
This commit is contained in:
Vikram S. Adve 2003-07-02 01:25:44 +00:00
parent 293af7edb6
commit e133e7d852

View File

@ -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;