From: wangyunjian <wangyunjian@huawei.com>
To: <dev@dpdk.org>
Cc: <jerry.lilijun@huawei.com>, <xudingke@huawei.com>,
Yunjian Wang <wangyunjian@huawei.com>, <stable@dpdk.org>
Subject: [dpdk-stable] [dpdk-dev] [PATCH] test-pmd: fix memory leaks when mtr policer actions update fails
Date: Sat, 23 May 2020 19:21:11 +0800 [thread overview]
Message-ID: <1590232871-21464-1-git-send-email-wangyunjian@huawei.com> (raw)
From: Yunjian Wang <wangyunjian@huawei.com>
Fix memory leaks reported by Coverity.
Fixes: e63b50162aa3 ("app/testpmd: clean metering and policing commands")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
app/test-pmd/cmdline_mtr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c
index caa7e9864..ee16244de 100644
--- a/app/test-pmd/cmdline_mtr.c
+++ b/app/test-pmd/cmdline_mtr.c
@@ -1262,6 +1262,7 @@ static void cmd_set_port_meter_policer_action_parsed(void *parsed_result,
ret = rte_mtr_policer_actions_update(port_id, mtr_id,
action_mask, actions, &error);
if (ret != 0) {
+ free(actions);
print_err_msg(&error);
return;
}
--
2.23.0
next reply other threads:[~2020-05-23 11:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-23 11:21 wangyunjian [this message]
2020-05-24 16:07 ` Thomas Monjalon
2020-05-25 1:45 ` wangyunjian
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=1590232871-21464-1-git-send-email-wangyunjian@huawei.com \
--to=wangyunjian@huawei.com \
--cc=dev@dpdk.org \
--cc=jerry.lilijun@huawei.com \
--cc=stable@dpdk.org \
--cc=xudingke@huawei.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).