From: Phil Yang Date: Mon, 15 Jan 2018 05:43:33 +0000 (+0800) Subject: test/memzone: fix freeing test X-Git-Tag: spdx-start~234 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c281b4fc71ddefe809994be10f53b87e1ba6c669;p=dpdk.git test/memzone: fix freeing test When reserving memzone for mz[], it will out of mz[RTE_MAX_MEMZONE] memory bound after the counter reached to RTE_MAX_MEMZONE. It will flush the counter's memory and lead to mz[] memory cannot be freed. Fixd by extend to mz[RTE_MAX_MEMZONE + 1]. Fixes: ff909fe21f0a ("mem: introduce memzone freeing") Cc: stable@dpdk.org Signed-off-by: Phil Yang Acked-by: Jianbo Liu Acked-by: Anatoly Burakov --- diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c index 151a997a8c..f6c9b56330 100644 --- a/test/test/test_memzone.c +++ b/test/test/test_memzone.c @@ -760,7 +760,7 @@ test_memzone_bounded(void) static int test_memzone_free(void) { - const struct rte_memzone *mz[RTE_MAX_MEMZONE]; + const struct rte_memzone *mz[RTE_MAX_MEMZONE + 1]; int i; char name[20];