From: Rory Sexton Date: Wed, 29 Jul 2020 08:37:54 +0000 (+0100) Subject: examples/vm_power: fix memory leak X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3ac192b30902094d02842c0877ba91ea0d66fbc2;p=dpdk.git examples/vm_power: fix memory leak Fix memory leak where variable oob_enable can go out of scope leaking the storage it points to. Coverity issue: 337674 Fixes: 95f648ff9ee ("examples/vm_power: make branch ratio threshold per core") Signed-off-by: Rory Sexton Acked-by: David Hunt --- diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c index 17b38406fc..75d5b5364f 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++) {