* [dpdk-dev] [PATCH] examples/vm_power: fix resource leak on error path
@ 2020-08-19 12:54 wangyunjian
2020-08-26 10:12 ` David Hunt
2020-10-30 12:35 ` David Marchand
0 siblings, 2 replies; 3+ messages in thread
From: wangyunjian @ 2020-08-19 12:54 UTC (permalink / raw)
To: dev, david.hunt
Cc: rory.sexton, jerry.lilijun, xudingke, Yunjian Wang, stable
From: Yunjian Wang <wangyunjian@huawei.com>
This patch fixes the resource leaks reported by coverity.
Coverity issue: 337674
Fixes: 95f648ff9eed ("examples/vm_power: make branch ratio threshold per core")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
examples/vm_power_manager/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index 3a8958058..6422d7b99 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -206,6 +206,7 @@ parse_args(int argc, char **argv)
}
if (branch_ratio <= 0.0 || branch_ratio > 100.0) {
printf("invalid branch ratio specified\n");
+ free(oob_enable);
return -1;
}
for (i = 0; i < ci->core_count; i++) {
--
2.23.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/vm_power: fix resource leak on error path
2020-08-19 12:54 [dpdk-dev] [PATCH] examples/vm_power: fix resource leak on error path wangyunjian
@ 2020-08-26 10:12 ` David Hunt
2020-10-30 12:35 ` David Marchand
1 sibling, 0 replies; 3+ messages in thread
From: David Hunt @ 2020-08-26 10:12 UTC (permalink / raw)
To: wangyunjian, dev; +Cc: rory.sexton, jerry.lilijun, xudingke, stable
Hi wangyunjian,
On 19/8/2020 1:54 PM, wangyunjian wrote:
> From: Yunjian Wang <wangyunjian@huawei.com>
>
> This patch fixes the resource leaks reported by coverity.
>
> Coverity issue: 337674
> Fixes: 95f648ff9eed ("examples/vm_power: make branch ratio threshold per core")
> Cc: stable@dpdk.org
>
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> ---
> examples/vm_power_manager/main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
> index 3a8958058..6422d7b99 100644
> --- a/examples/vm_power_manager/main.c
> +++ b/examples/vm_power_manager/main.c
> @@ -206,6 +206,7 @@ parse_args(int argc, char **argv)
> }
> if (branch_ratio <= 0.0 || branch_ratio > 100.0) {
> printf("invalid branch ratio specified\n");
> + free(oob_enable);
> return -1;
> }
> for (i = 0; i < ci->core_count; i++) {
Acked-by: David Hunt <david.hunt@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/vm_power: fix resource leak on error path
2020-08-19 12:54 [dpdk-dev] [PATCH] examples/vm_power: fix resource leak on error path wangyunjian
2020-08-26 10:12 ` David Hunt
@ 2020-10-30 12:35 ` David Marchand
1 sibling, 0 replies; 3+ messages in thread
From: David Marchand @ 2020-10-30 12:35 UTC (permalink / raw)
To: wangyunjian
Cc: dev, David Hunt, Rory Sexton, Lilijun (Jerry), xudingke, dpdk stable
On Wed, Aug 19, 2020 at 2:55 PM wangyunjian <wangyunjian@huawei.com> wrote:
>
> From: Yunjian Wang <wangyunjian@huawei.com>
>
> This patch fixes the resource leaks reported by coverity.
>
> Coverity issue: 337674
> Fixes: 95f648ff9eed ("examples/vm_power: make branch ratio threshold per core")
> Cc: stable@dpdk.org
>
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
This is a duplicate of https://patchwork.dpdk.org/patch/74985/.
Took the patch from Rory as it predates this one.
--
David Marchand
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-30 12:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19 12:54 [dpdk-dev] [PATCH] examples/vm_power: fix resource leak on error path wangyunjian
2020-08-26 10:12 ` David Hunt
2020-10-30 12:35 ` David Marchand
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).