]> git.proxmox.com Git - pve-qemu-kvm.git/blob - debian/patches/extra/CVE-2016-9101-net-eepro100-fix-memory-leak-in-device-uninit.patch
0ae895ad277c05b80a5f9266b33d41ce8ec7f040
[pve-qemu-kvm.git] / debian / patches / extra / CVE-2016-9101-net-eepro100-fix-memory-leak-in-device-uninit.patch
1 From 1fab838b55ee7cc199b105d80de4a80f336231b3 Mon Sep 17 00:00:00 2001
2 From: Li Qiang <liqiang6-s@360.cn>
3 Date: Sat, 8 Oct 2016 05:07:25 -0700
4 Subject: [PATCH 3/8] net: eepro100: fix memory leak in device uninit
5
6 The exit dispatch of eepro100 network card device doesn't free
7 the 's->vmstate' field which was allocated in device realize thus
8 leading a host memory leak. This patch avoid this.
9
10 Signed-off-by: Li Qiang <liqiang6-s@360.cn>
11 Signed-off-by: Jason Wang <jasowang@redhat.com>
12 ---
13 hw/net/eepro100.c | 1 +
14 1 file changed, 1 insertion(+)
15
16 diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c
17 index bab4dbf..4bf71f2 100644
18 --- a/hw/net/eepro100.c
19 +++ b/hw/net/eepro100.c
20 @@ -1843,6 +1843,7 @@ static void pci_nic_uninit(PCIDevice *pci_dev)
21 EEPRO100State *s = DO_UPCAST(EEPRO100State, dev, pci_dev);
22
23 vmstate_unregister(&pci_dev->qdev, s->vmstate, s);
24 + g_free(s->vmstate);
25 eeprom93xx_free(&pci_dev->qdev, s->eeprom);
26 qemu_del_nic(s->nic);
27 }
28 --
29 2.1.4
30