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 34694A0C4E; Mon, 12 Jul 2021 20:18:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D31834069E; Mon, 12 Jul 2021 20:18:41 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 1C2C44069D for ; Mon, 12 Jul 2021 20:18:39 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10043"; a="190412567" X-IronPort-AV: E=Sophos;i="5.84,234,1620716400"; d="scan'208";a="190412567" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2021 11:18:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,234,1620716400"; d="scan'208";a="486739490" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com) ([10.237.223.107]) by fmsmga004.fm.intel.com with ESMTP; 12 Jul 2021 11:18:35 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Date: Mon, 12 Jul 2021 19:18:32 +0100 Message-Id: <20210712181833.15293-1-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH 1/2] pipeline: fix incorrect resource free function 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 Sender: "dev" Due to a typo, the selector_free() function incorrectly takes an early return when the selectors array is non-NULL, as opposed to the other way around. Coverity issue: 371912 Fixes: cdaa937d3eaab ("pipeline: support selector table") Signed-off-by: Cristian Dumitrescu --- lib/pipeline/rte_swx_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pipeline/rte_swx_ctl.c b/lib/pipeline/rte_swx_ctl.c index f1480bc27b..dc093860de 100644 --- a/lib/pipeline/rte_swx_ctl.c +++ b/lib/pipeline/rte_swx_ctl.c @@ -815,7 +815,7 @@ selector_free(struct rte_swx_ctl_pipeline *ctl) { uint32_t i; - if (ctl->selectors) + if (!ctl->selectors) return; for (i = 0; i < ctl->info.n_selectors; i++) { -- 2.17.1