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 E1D7FA00BE; Mon, 27 Apr 2020 19:13:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 483161C21C; Mon, 27 Apr 2020 19:13:33 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 624CC1C20E for ; Mon, 27 Apr 2020 19:13:31 +0200 (CEST) IronPort-SDR: QppEuw2Mx4XeLNG1s1/iHaIpu7g01/1lP88oh5VRd5mecRBZrBvtQvMgvKJit++iKaBm6qa5bz jykg9gCIKfZA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2020 10:13:21 -0700 IronPort-SDR: laX6OK957OG2GxN0p7uh8GO3VDzbcKdMWpf1n1ht7Eckzv84IXLOjBxTqcpGSIvG90I6H93Bsn Z3x8kCzcqHnw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,324,1583222400"; d="scan'208";a="281835322" Received: from silpixa00400517.ir.intel.com ([10.237.214.174]) by fmsmga004.fm.intel.com with ESMTP; 27 Apr 2020 10:13:20 -0700 From: Jasvinder Singh To: dev@dpdk.org Cc: cristian.dumitrescu@intel.com Date: Mon, 27 Apr 2020 18:13:20 +0100 Message-Id: <20200427171320.82107-1-jasvinder.singh@intel.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200427140556.83262-1-jasvinder.singh@intel.com> References: <20200427140556.83262-1-jasvinder.singh@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] net/softnic: fix memory leak for thread 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" For sending request messages to data plane threads, the caller invokes thread_msg_send_recv() function which never returns null response. Thus, removed redundant check on the returned response. Coverity Issue: 357717, 357772 Fixes: 70709c78fda6 ("net/softnic: add command to enable/disable pipeline") Signed-off-by: Jasvinder Singh Acked-by: Cristian Dumitrescu --- v2: - change commit message drivers/net/softnic/rte_eth_softnic_thread.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c index d610b1617..d61846e03 100644 --- a/drivers/net/softnic/rte_eth_softnic_thread.c +++ b/drivers/net/softnic/rte_eth_softnic_thread.c @@ -359,8 +359,6 @@ softnic_thread_pipeline_enable(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = thread_msg_send_recv(softnic, thread_id, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -444,8 +442,6 @@ softnic_thread_pipeline_disable(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = thread_msg_send_recv(softnic, thread_id, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; -- 2.21.1