From b6f800b2897f8e2008d0897ceaa491a357eab1cf Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Tue, 31 Jan 2023 10:48:51 +0800
Subject: test/mbuf: fix mbuf reset test

[ upstream commit bf47fb83a61a4bc6bf45e1ec6e3ddd239a856190 ]

Retest "mbuf_autotest" will fail because the mbuf pool was
not freed after previous test successful done.
This patch fixes it.

Fixes: efc6f9104c80 ("mbuf: fix reset on mbuf free")
Cc: stable@dpdk.org

Signed-off-by: Jie Hai <haijie1@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_mbuf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index f54d1d7c00..cd9f8fd8cf 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -2769,6 +2769,7 @@ test_nb_segs_and_next_reset(void)
 			m2->nb_segs != 1 || m2->next != NULL)
 		GOTO_FAIL("nb_segs or next was not reset properly");
 
+	rte_mempool_free(pool);
 	return 0;
 
 fail:
-- 
2.23.0

