Quoting Janusz Krzysztofik (2022-02-18 15:19:35)
> @@ -206,15 +229,19 @@ static struct pci_device 
> *__igt_device_get_pci_device(int fd)
>                 igt_warn("Couldn't find PCI device %04x:%02x:%02x:%02x\n",
>                          pci_addr.domain, pci_addr.bus,
>                          pci_addr.device, pci_addr.function);
> -               return NULL;
> +               goto cleanup;
>         }
>  
>         if (pci_device_probe(pci_dev)) {
>                 igt_warn("Couldn't probe PCI device\n");
> -               return NULL;
> +               goto cleanup;
>         }
>  
>         return pci_dev;
> +
> +cleanup:
> +       pci_system_cleanup();

This is a global cleanup of libpciaccess iirc, such that if anyone else
was using the library they would be affected.

> +       return NULL;
>  }

Reply via email to