File CVE-2016-9101-qemuu-net-eepro100-memory-leakage-at-device-unplug.patch of Package xen.4507

References: bsc#1013668 CVE-2016-9101

The exit dispatch of eepro100 network card device doesn't free
the 's->vmstate' field which was allocated in device realize thus
leading a host memory leak. This patch avoid this.

Signed-off-by: Li Qiang <address@hidden>
---
 hw/net/eepro100.c | 1 +
 1 file changed, 1 insertion(+)

Index: xen-4.4.4-testing/tools/qemu-xen-dir-remote/hw/net/eepro100.c
===================================================================
--- xen-4.4.4-testing.orig/tools/qemu-xen-dir-remote/hw/net/eepro100.c
+++ xen-4.4.4-testing/tools/qemu-xen-dir-remote/hw/net/eepro100.c
@@ -1864,6 +1864,7 @@ static void pci_nic_uninit(PCIDevice *pc
     memory_region_destroy(&s->io_bar);
     memory_region_destroy(&s->flash_bar);
     vmstate_unregister(&pci_dev->qdev, s->vmstate, s);
+    g_free(s->vmstate);
     eeprom93xx_free(&pci_dev->qdev, s->eeprom);
     qemu_del_nic(s->nic);
 }
openSUSE Build Service is sponsored by