app/testpmd: fix memory leak for tm object
PATCH 1/1 app/testpmd: fix memory leak for tm object
Fixes memory leak for shared shaper object of the traffic manager.
--- app/test-pmd/softnicfwd.c | 2 ++ 1 file changed, 2 insertions(+)
app/test-pmd/softnicfwd.c +2 -0
@@ -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++;
Signature · 1 line
2.17.1
Quoted 5 lines · Jasvinder Singh
Fixes memory leak for shared shaper object of the traffic manager.
Fixes 5b590fbe09b6 ("app/testpmd: add traffic management forwarding mode")Signed-off-by Jasvinder Singh <[email protected]>
- needs stable tag: "Cc: [email protected]"
PATCH v2 1/1 app/testpmd: fix memory leak for tm object
In reply to Jasvinder SinghFixes memory leak for shared shaper object of the traffic manager.
---
v2
- cc to [email protected]
app/test-pmd/softnicfwd.c | 2 ++ 1 file changed, 2 insertions(+)
app/test-pmd/softnicfwd.c +2 -0
@@ -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++;
Signature · 1 line
2.17.1
Quoted 17 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Jasvinder Singh
Sent: Tuesday, November 6, 2018 10:23 AM
To: [email protected]
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Wu, Jingjing <[email protected]>; Iremonger, Bernard <[email protected]>
Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix memory leak for tm objectFixes memory leak for shared shaper object of the traffic manager.
Fixes 5b590fbe09b6 ("app/testpmd: add traffic management forwardingmode")
Cc: [email protected]
Quoted 9 lines
Signed-off-by Jasvinder Singh <[email protected]>Reviewed-by Ferruh Yigit <[email protected]>---
v2
- cc to [email protected]app/test-pmd/softnicfwd.c | 2 ++ 1 file changed, 2 insertions(+)
Applied to next-pipeline tree, thanks!