On 12/1/2023 8:03 AM, Yunjian Wang wrote: > In xdp_umem_configure() allocated memzone for the 'umem', we should > free it when xsk_umem__create() call fails, otherwise it will lead > to memory zone leak. > > Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") > Cc: sta...@dpdk.org > > Signed-off-by: Yunjian Wang <wangyunj...@huawei.com> > --- > drivers/net/af_xdp/rte_eth_af_xdp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c > b/drivers/net/af_xdp/rte_eth_af_xdp.c > index 2a20a6960c..2a1fdafb3c 100644 > --- a/drivers/net/af_xdp/rte_eth_af_xdp.c > +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c > @@ -1229,6 +1229,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals > *internals, > > if (ret) { > AF_XDP_LOG(ERR, "Failed to create umem\n"); > + rte_memzone_free(mz); >
Doesn't 'xdp_umem_destroy()', in the label 'err', already free it? > goto err; > } > umem->mz = mz;