[PATCH] app/pdump: free mempool at cleanup resources

Tianli Lai laitianli at tom.com
Thu Feb 24 13:14:58 CET 2022


the mempool should be free when cleanup resources.

Signed-off-by: Tianli Lai <laitianli at tom.com>
---
 app/pdump/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app/pdump/main.c b/app/pdump/main.c
index 46f9d25..8101078 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -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;
+		}
 	}
 }
 
-- 
1.8.3.1



More information about the dev mailing list