31 lines
983 B
Diff
31 lines
983 B
Diff
From 1fab838b55ee7cc199b105d80de4a80f336231b3 Mon Sep 17 00:00:00 2001
|
|
From: Li Qiang <liqiang6-s@360.cn>
|
|
Date: Sat, 8 Oct 2016 05:07:25 -0700
|
|
Subject: [PATCH 3/8] net: eepro100: fix memory leak in device uninit
|
|
|
|
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 <liqiang6-s@360.cn>
|
|
Signed-off-by: Jason Wang <jasowang@redhat.com>
|
|
---
|
|
hw/net/eepro100.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c
|
|
index bab4dbf..4bf71f2 100644
|
|
--- a/hw/net/eepro100.c
|
|
+++ b/hw/net/eepro100.c
|
|
@@ -1843,6 +1843,7 @@ static void pci_nic_uninit(PCIDevice *pci_dev)
|
|
EEPRO100State *s = DO_UPCAST(EEPRO100State, dev, pci_dev);
|
|
|
|
vmstate_unregister(&pci_dev->qdev, s->vmstate, s);
|
|
+ g_free(s->vmstate);
|
|
eeprom93xx_free(&pci_dev->qdev, s->eeprom);
|
|
qemu_del_nic(s->nic);
|
|
}
|
|
--
|
|
2.1.4
|
|
|