Commit 2634ab7f authored by Li Qiang's avatar Li Qiang Committed by Jason Wang
Browse files

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: default avatarLi Qiang <liqiang6-s@360.cn>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
parent 9463c077
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment