* [dpdk-dev] [PATCH] testpmd: fix memory leak for dscp table
@ 2018-11-14 11:58 Jasvinder Singh
2018-11-18 20:36 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Jasvinder Singh @ 2018-11-14 11:58 UTC (permalink / raw)
To: dev; +Cc: stable, bernard.iremonger, jingjing.wu, wenzhuo.lu
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)
print_err_msg(&error);
- return;
- }
+
+free_table:
free(dscp_table);
}
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] testpmd: fix memory leak for dscp table
2018-11-14 11:58 [dpdk-dev] [PATCH] testpmd: fix memory leak for dscp table Jasvinder Singh
@ 2018-11-18 20:36 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2018-11-18 20:36 UTC (permalink / raw)
To: Jasvinder Singh; +Cc: stable, dev, bernard.iremonger, jingjing.wu, wenzhuo.lu
14/11/2018 12:58, Jasvinder Singh:
> 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>
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-18 20:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-14 11:58 [dpdk-dev] [PATCH] testpmd: fix memory leak for dscp table Jasvinder Singh
2018-11-18 20:36 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
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).