From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B5ECBA04AF; Wed, 19 Aug 2020 14:55:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B2BDDAAD5; Wed, 19 Aug 2020 14:55:23 +0200 (CEST) Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by dpdk.org (Postfix) with ESMTP id D68652C02; Wed, 19 Aug 2020 14:55:21 +0200 (CEST) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8B319792A1DA30EE1866; Wed, 19 Aug 2020 20:55:16 +0800 (CST) Received: from localhost (10.174.185.168) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Wed, 19 Aug 2020 20:55:08 +0800 From: wangyunjian To: , CC: , , , Yunjian Wang , Date: Wed, 19 Aug 2020 20:54:52 +0800 Message-ID: X-Mailer: git-send-email 1.9.5.msysgit.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.185.168] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH] examples/vm_power: fix resource leak on error path X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Yunjian Wang 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 --- 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