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 <phil.yang@arm.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
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];