mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
ARMAsmParser: Plug a memory leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117648 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c223e2b10b
commit
61a4d56a03
@ -464,9 +464,10 @@ ARMOperand *ARMAsmParser::ParseMemory() {
|
||||
return 0;
|
||||
}
|
||||
int BaseRegNum = 0;
|
||||
if (ARMOperand *Op = MaybeParseRegister(false))
|
||||
if (ARMOperand *Op = MaybeParseRegister(false)) {
|
||||
BaseRegNum = Op->getReg();
|
||||
else {
|
||||
delete Op;
|
||||
} else {
|
||||
Error(BaseRegTok.getLoc(), "register expected");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user