In hotplug usecase, devargs will be allocated in secondary process in the function alloc_devargs. Since it will not be insert into the devarg_list, it will have no chance to be freed.
This patch adds additional memory free for device structure member devargs in the secondary process in rte_vdev_uninit. Fixes: f5b2eff0847d ("bus/vdev: fix devargs after multi-process bus scan") Cc: sta...@dpdk.org Signed-off-by: Wenjun Wu <wenjun1...@intel.com> --- drivers/bus/vdev/vdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c index 7974b27295..3f4e6a1b55 100644 --- a/drivers/bus/vdev/vdev.c +++ b/drivers/bus/vdev/vdev.c @@ -373,6 +373,11 @@ rte_vdev_uninit(const char *name) TAILQ_REMOVE(&vdev_device_list, dev, next); rte_devargs_remove(dev->device.devargs); + if (rte_eal_process_type() == RTE_PROC_SECONDARY && + dev->device.devargs != NULL) { + rte_devargs_reset(dev->device.devargs); + free(dev->device.devargs); + } free(dev); unlock: -- 2.34.1