If GCC malloc function tracing attributes are added, the the following error is
detected at compile time:
../drivers/net/cnxk/cnxk_ethdev_sec.c: In function
‘cnxk_nix_inl_custom_meta_pool_cb’:
../drivers/common/cnxk/roc_platform.h:196:32: warning: pointer ‘hp’ used after
‘rte_mempool_free’ [-Wuse-after-free]
196 | #define plt_free rte_free
../drivers/net/cnxk/cnxk_ethdev_sec.c:140:17: note: in expansion of macro
‘plt_free’
140 | plt_free(hp->pool_config);
| ^~~~~~~~
../drivers/net/cnxk/cnxk_ethdev_sec.c:139:17: note: call to ‘rte_mempool_free’
here
139 | rte_mempool_free(hp);
| ^~~~~~~~~~~~~~~~~~~~
If GCC malloc function tracing attributes are added, the the following error is detected at compile time: ../drivers/net/cnxk/cnxk_ethdev_sec.c: In function ‘cnxk_nix_inl_custom_meta_pool_cb’: ../drivers/common/cnxk/roc_platform.h:196:32: warning: pointer ‘hp’ used after ‘rte_mempool_free’ [-Wuse-after-free] 196 | #define plt_free rte_free ../drivers/net/cnxk/cnxk_ethdev_sec.c:140:17: note: in expansion of macro ‘plt_free’ 140 | plt_free(hp->pool_config); | ^~~~~~~~ ../drivers/net/cnxk/cnxk_ethdev_sec.c:139:17: note: call to ‘rte_mempool_free’ here 139 | rte_mempool_free(hp); | ^~~~~~~~~~~~~~~~~~~~