[dpdk-stable] [dpdk-dev] [PATCH] examples/vm_power: fix resource leak on error path
wangyunjian
wangyunjian at huawei.com
Wed Aug 19 14:54:52 CEST 2020
From: Yunjian Wang <wangyunjian at 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 at dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian at 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
More information about the stable
mailing list