DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] test-pmd: fix memory leaks when mtr policer actions update fails
@ 2020-05-25  1:46 wangyunjian
  2020-05-25  6:51 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
  2020-05-27 22:57 ` Ferruh Yigit
  0 siblings, 2 replies; 7+ messages in thread
From: wangyunjian @ 2020-05-25  1:46 UTC (permalink / raw)
  To: dev; +Cc: jerry.lilijun, xudingke, Yunjian Wang, stable

From: Yunjian Wang <wangyunjian@huawei.com>

This patch fixes the Huawei internal coverity reported
resource leak issue.

Fixes: e63b50162aa3 ("app/testpmd: clean metering and policing commands")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
v2:
 * Update commit log
---
 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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-27 22:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25  1:46 [dpdk-dev] [PATCH v2] test-pmd: fix memory leaks when mtr policer actions update fails wangyunjian
2020-05-25  6:51 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2020-05-26  2:04   ` wangyunjian
2020-05-26  7:13     ` Thomas Monjalon
2020-05-27  2:10       ` wangyunjian
2020-05-27  8:05         ` Thomas Monjalon
2020-05-27 22:57 ` Ferruh Yigit

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).