From: Jasvinder Singh Date: Tue, 6 Nov 2018 10:23:06 +0000 (+0000) Subject: app/testpmd: fix memory leak for TM object X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8bf02b320e27ec27af12d345663f557b04a4c677;p=dpdk.git app/testpmd: fix memory leak for TM object 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 --- diff --git a/app/test-pmd/softnicfwd.c b/app/test-pmd/softnicfwd.c index 7ff622806f..94e6669d38 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++;