bus/pci: fix memory leak when unmapping VFIO resource
authorYunjian Wang <wangyunjian@huawei.com>
Fri, 11 Sep 2020 10:57:42 +0000 (18:57 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 5 Oct 2020 08:08:57 +0000 (10:08 +0200)
commite34a43a6729dd33e430e1815a395893fe1c643d6
tree3cfdc1f0378a66c9e0d85708629490d8e94d280b
parent4b10ae80272b1bec113fbf5848065b66f030c327
bus/pci: fix memory leak when unmapping VFIO resource

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 <wangyunjian@huawei.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
drivers/bus/pci/linux/pci_vfio.c