irq: fix memory leak

entry is moved from list but is not freed.

Signed-off-by: linzhecheng <linzhecheng@huawei.com>

Message-Id: <20171225024704.19540-1-linzhecheng@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
linzhecheng 2017-12-25 10:47:04 +08:00 committed by Paolo Bonzini
parent db08b687cd
commit 01960e6d21

View File

@ -3470,6 +3470,7 @@ int kvm_arch_release_virq_post(int virq)
if (entry->virq == virq) {
trace_kvm_x86_remove_msi_route(virq);
QLIST_REMOVE(entry, list);
g_free(entry);
break;
}
}