[snip]
> +static void
> +get_kernel_driver_type(struct rte_pci_device *dev __rte_unused)

"dev" is used.

> +{
> +     /*
> +      * If another kernel driver is supported the relevant checking
> +      * functions should be here
> +      */
> +     dev->kdrv = RTE_KDRV_NONE;
> +}
> +
> +static int
> +pci_scan_one(HDEVINFO dev_info, PSP_DEVINFO_DATA device_info_data)
> +{
> +     struct rte_pci_device *dev;
> +     int ret = -1;
> +
> +     dev = malloc(sizeof(*dev));
> +     if (dev == NULL) {
> +             ret = -1;
> +             goto end;
> +     }
> +
> +     memset(dev, 0, sizeof(*dev));
> +
> +     char  pci_device_info[PATH_MAX];
> +     BOOL  res;
> +     struct rte_pci_addr addr;
> +     struct rte_pci_id pci_id;
> +
> +     /* Retrieve PCI device IDs */
> +     res = SetupDiGetDeviceRegistryPropertyA(dev_info, device_info_data,
> +                     SPDRP_HARDWAREID, NULL, (BYTE *)&pci_device_info,
> +                     sizeof(pci_device_info), NULL);
> +     if (!res) {
> +             RTE_LOG_WIN32_ERR(
> +                     "SetupDiGetDeviceRegistryPropertyA(SPDRP_HARDWAREID)");
> +             return -1;

"dev" leaks here.

[snip]

-- 
Dmitry Kozlyuk

Reply via email to