[v2,07/16] net/cnxk: fix use-after-free
Checks
Commit Message
The driver would refer to the mempool object after it was freed.
Bugzilla ID: 1554
Fixes: 7ea187184a51 ("common/cnxk: support 1-N pool-aura per NIX LF")
Cc: rbhansali@marvell.com
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/cnxk/cnxk_ethdev_sec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -136,8 +136,8 @@ cnxk_nix_inl_custom_meta_pool_cb(uintptr_t pmpool, uintptr_t *mpool, const char
return -EINVAL;
}
- rte_mempool_free(hp);
plt_free(hp->pool_config);
+ rte_mempool_free(hp);
*aura_handle = 0;
*mpool = 0;