mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-10 04:28:31 +00:00
ACRN/DM: Destroy the created pci_device iterator to fix memory leak in passthru_init
Now it will call the below function to create the corresponding pci_device_iterator in passthrough device initialization. But it is not released in time. So it needs to be released to fix the memory leak issue. Tracked-On: #2762 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: He, Min <min.he@intel.com> Acked-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
parent
31cb4721e1
commit
93386d3c70
@ -815,6 +815,7 @@ passthru_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts)
|
||||
break;
|
||||
}
|
||||
}
|
||||
pci_iterator_destroy(iter);
|
||||
|
||||
if (error < 0) {
|
||||
warnx("No physical PCI device %x:%x.%x!", bus, slot, func);
|
||||
|
Loading…
Reference in New Issue
Block a user