diff --git a/devicemodel/hw/pci/passthrough.c b/devicemodel/hw/pci/passthrough.c index be26b84d2..efef7314f 100644 --- a/devicemodel/hw/pci/passthrough.c +++ b/devicemodel/hw/pci/passthrough.c @@ -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);