kvm: g_malloc() can't fail, bury dead error handling
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
66c5f3e596
commit
9834fe02b0
@ -2070,10 +2070,6 @@ int kvm_insert_breakpoint(CPUState *cpu, target_ulong addr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bp = g_malloc(sizeof(struct kvm_sw_breakpoint));
|
bp = g_malloc(sizeof(struct kvm_sw_breakpoint));
|
||||||
if (!bp) {
|
|
||||||
return -ENOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
bp->pc = addr;
|
bp->pc = addr;
|
||||||
bp->use_count = 1;
|
bp->use_count = 1;
|
||||||
err = kvm_arch_insert_sw_breakpoint(cpu, bp);
|
err = kvm_arch_insert_sw_breakpoint(cpu, bp);
|
||||||
|
Loading…
Reference in New Issue
Block a user