]> git.proxmox.com Git - mirror_qemu.git/commitdiff
kvm: g_malloc() can't fail, bury dead error handling
authorMarkus Armbruster <armbru@redhat.com>
Wed, 4 Feb 2015 10:26:04 +0000 (11:26 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 10 Feb 2015 06:27:20 +0000 (09:27 +0300)
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>
kvm-all.c

index 2f21a4e6fed08bb001ad99ab1e838580da771a01..05a79c20e0bbabfd8e46515001e9b30d6f7e0a0e 100644 (file)
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -2070,10 +2070,6 @@ int kvm_insert_breakpoint(CPUState *cpu, target_ulong addr,
         }
 
         bp = g_malloc(sizeof(struct kvm_sw_breakpoint));
-        if (!bp) {
-            return -ENOMEM;
-        }
-
         bp->pc = addr;
         bp->use_count = 1;
         err = kvm_arch_insert_sw_breakpoint(cpu, bp);