DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jasvinder Singh <jasvinder.singh@intel.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, jingjing.wu@intel.com,
	bernard.iremonger@intel.com
Subject: [dpdk-dev] [PATCH] app/testpmd: fix memory leak for tm object
Date: Mon,  5 Nov 2018 16:21:52 +0000	[thread overview]
Message-ID: <20181105162152.31301-1-jasvinder.singh@intel.com> (raw)

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 <jasvinder.singh@intel.com>
---
 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

             reply	other threads:[~2018-11-05 16:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05 16:21 Jasvinder Singh [this message]
2018-11-05 19:34 ` Ferruh Yigit
2018-11-06 10:23 ` [dpdk-dev] [PATCH v2] " Jasvinder Singh
2018-11-12 16:43   ` Dumitrescu, Cristian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181105162152.31301-1-jasvinder.singh@intel.com \
    --to=jasvinder.singh@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jingjing.wu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).