Allows to drop checking for out-of-memory. Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx> --- qemu-kvm.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 6bdd7b5..eb8f176 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -258,7 +258,6 @@ int kvm_add_routing_entry(struct kvm_irq_routing_entry *entry, { #ifdef KVM_CAP_IRQ_ROUTING KVMState *s = kvm_state; - struct kvm_irq_routing *z; struct kvm_irq_routing_entry *new; int n, size; @@ -269,12 +268,8 @@ int kvm_add_routing_entry(struct kvm_irq_routing_entry *entry, } size = sizeof(struct kvm_irq_routing); size += n * sizeof(*new); - z = realloc(s->irq_routes, size); - if (!z) { - return -ENOMEM; - } + s->irq_routes = g_realloc(s->irq_routes, size); s->nr_allocated_irq_routes = n; - s->irq_routes = z; s->msi_cache = g_realloc(s->msi_cache, sizeof(*s->msi_cache) * n); } -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html