mirror of https://github.com/xemu-project/xemu.git
nvme: free cmbuf in nvme_exit
This avoid a memory leak in unhotplug nvme device. Signed-off-by: Li Qiang <liq3ea@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
20faf0f5f8
commit
a883d6a0bc
|
@ -1332,6 +1332,9 @@ static void nvme_exit(PCIDevice *pci_dev)
|
|||
g_free(n->cq);
|
||||
g_free(n->sq);
|
||||
|
||||
if (n->cmb_size_mb) {
|
||||
g_free(n->cmbuf);
|
||||
}
|
||||
msix_uninit_exclusive_bar(pci_dev);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue