vfio: fix mem leak when unmapping resource
Checks
Commit Message
The 'vfio_res' is not freed when unmapping resource by primary process.
This leads to memory leak.
Fixes: ab53203e194b ("vfio: enable unmapping resource for secondary")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <yunjian.wang@foxmail.com>
---
drivers/bus/pci/linux/pci_vfio.c | 1 +
1 file changed, 1 insertion(+)
@@ -966,6 +966,7 @@ pci_vfio_unmap_resource_primary(struct rte_pci_device *dev)
}
TAILQ_REMOVE(vfio_res_list, vfio_res, next);
+ rte_free(vfio_res);
return 0;
}