From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jasvinder Singh Subject: [PATCH v2] app/testpmd: fix memory leak for tm object Date: Tue, 6 Nov 2018 10:23:06 +0000 Message-ID: <20181106102306.96656-1-jasvinder.singh@intel.com> References: <20181105162152.31301-1-jasvinder.singh@intel.com> Cc: stable@dpdk.org, ferruh.yigit@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com To: dev@dpdk.org Return-path: In-Reply-To: <20181105162152.31301-1-jasvinder.singh@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fixes memory leak for shared shaper object of the traffic manager. Fixes: 5b590fbe09b6 ("app/testpmd: add traffic management forwarding mode") Cc: stable@dpdk.org Signed-off-by: Jasvinder Singh Reviewed-by: Ferruh Yigit --- v2 - cc to stable@dpdk.org app/test-pmd/softnicfwd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-pmd/softnicfwd.c b/app/test-pmd/softnicfwd.c index 7ff622806..94e6669d3 100644 --- a/app/test-pmd/softnicfwd.c +++ b/app/test-pmd/softnicfwd.c @@ -458,6 +458,7 @@ softport_tm_tc_node_add(portid_t port_id, error->message, shaper_profile_id); + free(tnp.shared_shaper_id); return -1; } tnp.shaper_profile_id = shaper_profile_id; @@ -473,6 +474,7 @@ softport_tm_tc_node_add(portid_t port_id, error->message, h->tc_node_id[pos][k]); + free(tnp.shared_shaper_id); return -1; } shaper_profile_id++; -- 2.17.1