app/pdump: free mempool at cleanup resources
PATCH 1/1 app/pdump: free mempool at cleanup resources
the mempool should be free when cleanup resources.
Signed-off-by Tianli Lai <[email protected]>
--- app/pdump/main.c | 4 ++++ 1 file changed, 4 insertions(+)
app/pdump/main.c +4 -0
@@ -510,6 +510,10 @@ struct parse_val {rte_ring_free (pt->rx_ring);if (pt->tx_ring)rte_ring_free (pt->tx_ring); +if (pt->mp) { +rte_mempool_free (pt->mp); + pt->mp =NULL ; + } } }
Signature · 1 line
1.8.3.1
app/pdump/main.c struct parse_val { · line 515
Quoted 3 lines · On Thu, 24 Feb 2022 20:14:58 +0800 Tianli Lai <[email protected]> wrote:
app/pdump/main.c +3
-0+if (pt->mp) { +rte_mempool_free (pt->mp); + pt->mp =NULL ;
Check for null is unnecessary here, rte_mempool_free(NULL) is nop.