From: Reshma Pattan Date: Thu, 26 Jul 2018 16:50:08 +0000 (+0100) Subject: latency: free up the memzone X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8224b9d682d436c3d9f5f448e9f8a19fb872ed40;p=dpdk.git latency: free up the memzone Free up the memzone allocated during the rte_latencystats_init(). Fixes: 5cd3cac9ed ("latency: added new library for latency stats") CC: stable@dpdk.org Signed-off-by: Reshma Pattan Acked-by: Remy Horton --- diff --git a/lib/librte_latencystats/rte_latencystats.c b/lib/librte_latencystats/rte_latencystats.c index 46c69bf058..1fdec68e35 100644 --- a/lib/librte_latencystats/rte_latencystats.c +++ b/lib/librte_latencystats/rte_latencystats.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2017 Intel Corporation + * Copyright(c) 2018 Intel Corporation */ #include @@ -265,6 +265,7 @@ rte_latencystats_uninit(void) uint16_t qid; int ret = 0; struct rxtx_cbs *cbs = NULL; + const struct rte_memzone *mz = NULL; /** De register Rx/Tx callbacks */ RTE_ETH_FOREACH_DEV(pid) { @@ -288,6 +289,11 @@ rte_latencystats_uninit(void) } } + /* free up the memzone */ + mz = rte_memzone_lookup(MZ_RTE_LATENCY_STATS); + if (mz) + rte_memzone_free(mz); + return 0; }