DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jasvinder Singh <jasvinder.singh@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, bernard.iremonger@intel.com,
	jingjing.wu@intel.com, wenzhuo.lu@intel.com
Subject: [dpdk-dev] [PATCH] testpmd: fix memory leak for dscp table
Date: Wed, 14 Nov 2018 11:58:59 +0000
Message-ID: <20181114115859.160722-1-jasvinder.singh@intel.com> (raw)

Fix memory leak for dscp table reported by coverity

Coverity ID: 326961
Fixes: 281eeb8afc55 ("app/testpmd: add commands for metering and policing")
CC: stable@dpdk.org

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
 app/test-pmd/cmdline_mtr.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c
index 846de88db..c506d87ee 100644
--- a/app/test-pmd/cmdline_mtr.c
+++ b/app/test-pmd/cmdline_mtr.c
@@ -1148,15 +1148,15 @@ static void cmd_set_port_meter_dscp_table_parsed(void *parsed_result,
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
-		return;
+		goto free_table;
 	/* Update Meter DSCP Table*/
 	ret = rte_mtr_meter_dscp_table_update(port_id, mtr_id,
 		dscp_table, &error);
-	if (ret != 0) {
+	if (ret != 0)
-		return;
-	}

             reply	other threads:[~2018-11-14 11:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-14 11:58 Jasvinder Singh [this message]
2018-11-18 20:36 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon

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:

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

  git send-email \
    --in-reply-to=20181114115859.160722-1-jasvinder.singh@intel.com \
    --to=jasvinder.singh@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git