DPDK patches and discussions
 help / color / mirror / Atom feed
From: wangyunjian <wangyunjian@huawei.com>
To: <dev@dpdk.org>, <david.hunt@intel.com>
Cc: <rory.sexton@intel.com>, <jerry.lilijun@huawei.com>,
	<xudingke@huawei.com>, Yunjian Wang <wangyunjian@huawei.com>,
Subject: [dpdk-dev] [PATCH] examples/vm_power: fix resource leak on error path
Date: Wed, 19 Aug 2020 20:54:52 +0800
Message-ID: <e13b343082f5c968749370021775a4d548d2c6aa.1597841272.git.wangyunjian@huawei.com> (raw)

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++) {

             reply	other threads:[~2020-08-19 12:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19 12:54 wangyunjian [this message]
2020-08-26 10:12 ` David Hunt
2020-10-30 12:35 ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e13b343082f5c968749370021775a4d548d2c6aa.1597841272.git.wangyunjian@huawei.com \
    --to=wangyunjian@huawei.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerry.lilijun@huawei.com \
    --cc=rory.sexton@intel.com \
    --cc=stable@dpdk.org \
    --cc=xudingke@huawei.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git