From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5C004A034C; Tue, 10 May 2022 03:17:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0E25B410EE; Tue, 10 May 2022 03:17:18 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 7F31140DDA for ; Tue, 10 May 2022 03:17:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652145436; x=1683681436; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=HmbA8G8q4S5d9zV8QqD6T3ms7RRY9xzcXpcmv2onbQ0=; b=LtKHlFE35vBMaaIKMrA5HsLgC4jltHDenH95yjQ4Qv5YtZy5/8o8NP2x XorXqy0DKz3deMrEz6di34Qzed8MFt/exJ3vEjzvnRE6qCkwe6ovt9ITo VbXURNs0g9wzIuj6C8f0kVoG/MBizGJlJrSgLCpae10FVfuMez4r9lHVC RjGeJ10PJ5mTxVuwaU9eaHwy6GdPfBVOvVtq3KC0ORq41KZbI8xl0SJ/e AAYF2KM6rFfi3ZtYU4IsSmkTJfLxXZoIgYYRRucL7GqhtM/OvfoxsYoYi lNF1sCjvDMwqB7krjLxXhnxFdf8rO9f5znVLp/AKX6enx0v6tcuI3Ysv0 w==; X-IronPort-AV: E=McAfee;i="6400,9594,10342"; a="249754158" X-IronPort-AV: E=Sophos;i="5.91,213,1647327600"; d="scan'208";a="249754158" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2022 18:17:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,213,1647327600"; d="scan'208";a="602223399" Received: from npg-wuwenjun-dpdk-01.sh.intel.com ([10.67.110.181]) by orsmga001.jf.intel.com with ESMTP; 09 May 2022 18:17:13 -0700 From: Wenjun Wu To: dev@dpdk.org, jingjing.wu@intel.com, beilei.xing@intel.com, qi.z.zhang@intel.com Cc: Wenjun Wu Subject: [PATCH v1] net/iavf: fix resource leak issue Date: Tue, 10 May 2022 08:54:25 +0800 Message-Id: <20220510005425.1648591-1-wenjun1.wu@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This patch fixes resource leak issue reported by coverity. Coverity issue: 378017 Fixes: b14e8a57b9fe ("net/iavf: support quanta size configuration") Signed-off-by: Wenjun Wu --- drivers/net/iavf/iavf_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index d1a2b53675..82672841f4 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -2188,7 +2188,8 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev) if (ad->devargs.quanta_size < 256 || ad->devargs.quanta_size > 4096 || ad->devargs.quanta_size & 0x40) { PMD_INIT_LOG(ERR, "invalid quanta size\n"); - return -EINVAL; + ret = -EINVAL; + goto bail; } bail: -- 2.25.1