[PULL,39/52] irq: fix memory leak

Message ID 1515756676-3860-40-git-send-email-pbonzini@redhat.com
State New
Headers show
Series
  • [PULL,01/52] scsi-generic: Add share-rw option
Related show

Commit Message

Paolo Bonzini Jan. 12, 2018, 11:31 a.m.
From: linzhecheng <linzhecheng@huawei.com>

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>
---
 target/i386/kvm.c | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 825aea5..4912f4d 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -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;
         }
     }