From 98aabe1b701f3f58153aef029d483e2d8b9ca7b6 Mon Sep 17 00:00:00 2001 From: Shreyansh Jain Date: Wed, 5 Apr 2017 15:05:33 +0530 Subject: [PATCH] test/mempool: free mempool on exit mempool autotest was not freeing the mempools. Fixes: 8ef772ae ("app/test: rework mempool test") Cc: stable@dpdk.org Signed-off-by: Shreyansh Jain Reviewed-by: Santosh Shukla Acked-by: Olivier Matz --- test/test/test_mempool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test/test_mempool.c b/test/test/test_mempool.c index b9880b32b8..715b250c39 100644 --- a/test/test/test_mempool.c +++ b/test/test/test_mempool.c @@ -509,6 +509,7 @@ walk_cb(struct rte_mempool *mp, void *userdata __rte_unused) static int test_mempool(void) { + int ret = -1; struct rte_mempool *mp_cache = NULL; struct rte_mempool *mp_nocache = NULL; struct rte_mempool *mp_stack = NULL; @@ -607,13 +608,13 @@ test_mempool(void) rte_mempool_list_dump(stdout); - return 0; + ret = 0; err: rte_mempool_free(mp_nocache); rte_mempool_free(mp_cache); rte_mempool_free(mp_stack); - return -1; + return ret; } REGISTER_TEST_COMMAND(mempool_autotest, test_mempool); -- 2.20.1